var Vips=(()=>{var _scriptName=globalThis.document?.currentScript?.src;return async function(moduleArg={}){var moduleRtn;var n=moduleArg,aa=!!globalThis.window,ba=!!globalThis.WorkerGlobalScope,t=ba&&"em-pthread"==globalThis.name;n.dynamicLibraries=n.dynamicLibraries||["vips-jxl.wasm","vips-heif.wasm"];n.workaroundCors&&(n.mainScriptUrlOrBlob=n.mainScriptUrlOrBlob||URL.createObjectURL(new Blob([`importScripts('${_scriptName}');`],{type:"application/javascript"})));var da=[],ea="./this.program";ba&&(_scriptName=self.location.href);var fa="";function ha(a){return n.locateFile?n.locateFile(a,fa):fa+a}var ia,ja;
if(aa||ba){try{fa=(new URL(".",_scriptName)).href}catch{}ba&&(ja=a=>{var b=new XMLHttpRequest;b.open("GET",a,!1);b.responseType="arraybuffer";b.send(null);return new Uint8Array(b.response)});ia=async a=>{a=await fetch(a,{credentials:"same-origin"});if(a.ok)return a.arrayBuffer();throw Error(a.status+" : "+a.url);}}var ka=console.log.bind(console),v=console.error.bind(console),la=[],ma,na,oa=!1,pa;class w extends Error{}class qa extends w{}
class ra extends w{constructor(a){super(a);this.ha=a;a=sa(a instanceof ra?a.ha:a);this.name=a[0];this.message=a[1]}}var ta,ua,va={},wa;
if(t){var xa=!1;self.onunhandledrejection=b=>{throw b.reason||b;};function a(b){try{var c=b.data,d=c.W;if("load"===d){let e=[];self.onmessage=f=>e.push(f);wa=()=>{postMessage({W:"loaded"});for(let f of e)a(f);self.onmessage=a};la=c.Hb;va=c.qc;for(const f of c.Tb)if(!n[f]||n[f].proxy)n[f]=(...g)=>{postMessage({W:"callHandler",Sb:f,Bb:g})},"print"==f&&(ka=n[f]),"printErr"==f&&(v=n[f]);ya=c.wc;za();na=c.xc;Ba();Ca()}else if("run"===d){Da(c.Y);Ea(c.Y,0,0,1,0,0);Fa();Ga(c.Y);xa||(Ha(),xa=!0);try{Ia(c.tc,
c.Fa)}catch(e){if("unwind"!=e)throw e;}}else"setimmediate"!==c.target&&("checkMailbox"===d?xa&&Ja():d&&(v(`worker: received unknown command ${d}`),v(c)))}catch(e){throw Ka(),e;}}self.onmessage=a}var x,y,z,B,C,E,La,Ma,F,Oa,Pa=!1,Qa=!1;function za(){var a=ya.buffer;x=new Int8Array(a);z=new Int16Array(a);y=new Uint8Array(a);B=new Uint16Array(a);C=new Int32Array(a);E=new Uint32Array(a);La=new Float32Array(a);Ma=new Float64Array(a);F=new BigInt64Array(a);Oa=new BigUint64Array(a)}var Ra=[];
function Sa(){Pa=!0;t?wa():(Ta(Ra),n.noFSInit||FS.Ja||FS.init(),Ua.__wasm_call_ctors(),Ta(Va),FS.gb=!1)}function J(a){n.onAbort?.(a);a="Aborted("+a+")";v(a);oa=!0;a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info.");ua?.(a);throw a;}var Wa;async function Xa(a){if(!ma)try{var b=await ia(a);return new Uint8Array(b)}catch{}if(a==Wa&&ma)a=new Uint8Array(ma);else if(ja)a=ja(a);else throw"both async and sync fetching of the wasm failed";return a}
async function Ya(a,b){try{var c=await Xa(a);return await WebAssembly.instantiate(c,b)}catch(d){v(`failed to asynchronously prepare wasm: ${d}`),J(d)}}async function Za(a){var b=Wa;if(!ma)try{var c=fetch(b,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(c,a)}catch(d){v(`wasm streaming compile failed: ${d}`),v("falling back to ArrayBuffer instantiation")}return Ya(b,a)}
function $a(){K={__assert_fail:ab,__call_sighandler:bb,__cxa_begin_catch:cb,__cxa_end_catch:db,__cxa_find_matching_catch_2:eb,__cxa_find_matching_catch_3:gb,__cxa_rethrow:hb,__cxa_throw:ib,__cxa_uncaught_exceptions:jb,__lsan_ignore_object:kb,__pthread_create_js:lb,__resumeException:mb,__syscall_dup:nb,__syscall_faccessat:ob,__syscall_fcntl64:pb,__syscall_fstat64:qb,__syscall_ftruncate64:rb,__syscall_getcwd:sb,__syscall_ioctl:tb,__syscall_lstat64:ub,__syscall_newfstatat:vb,__syscall_openat:wb,__syscall_poll:xb,
__syscall_rmdir:yb,__syscall_stat64:zb,__syscall_unlinkat:Ab,_abort_js:Bb,_dlopen_js:Cb,_dlsym_catchup_js:Db,_dlsym_js:Gb,_embind_finalize_value_object:Hb,_embind_register_arithmetic_vector:Ib,_embind_register_bigint:Jb,_embind_register_bool:Kb,_embind_register_class:Lb,_embind_register_class_class_function:Mb,_embind_register_class_constructor:Nb,_embind_register_class_function:Ob,_embind_register_class_property:Pb,_embind_register_emval:Qb,_embind_register_enum:Rb,_embind_register_enum_value:Sb,
_embind_register_float:Tb,_embind_register_function:Ub,_embind_register_integer:Vb,_embind_register_iterable:Wb,_embind_register_memory_view:Xb,_embind_register_optional:Yb,_embind_register_std_string:Zb,_embind_register_std_wstring:$b,_embind_register_value_object:ac,_embind_register_value_object_field:bc,_embind_register_void:cc,_emscripten_dlopen_js:dc,_emscripten_dlsync_threads:ec,_emscripten_get_dynamic_libraries_js:fc,_emscripten_init_main_thread_js:gc,_emscripten_notify_mailbox_postmessage:hc,
_emscripten_receive_on_main_thread_js:ic,_emscripten_runtime_keepalive_clear:jc,_emscripten_thread_cleanup:kc,_emscripten_thread_exit_joinable:lc,_emscripten_thread_mailbox_await:Ga,_emscripten_thread_set_strongref:mc,_emscripten_throw_longjmp:nc,_emval_array_to_memory_view:oc,_emval_create_invoker:pc,_emval_decref:qc,_emval_get_global:rc,_emval_get_module_property:sc,_emval_get_property:tc,_emval_incref:uc,_emval_instanceof:vc,_emval_invoke:wc,_emval_is_number:xc,_emval_is_string:yc,_emval_new_cstring:zc,
_emval_run_destructors:Ac,_emval_set_property:Bc,_emval_typeof:Cc,_gmtime_js:Dc,_localtime_js:Ec,_mmap_js:Fc,_munmap_js:Gc,_tzset_js:Hc,clock_time_get:Ic,emscripten_check_blocking_allowed:Jc,emscripten_date_now:Kc,emscripten_err:Lc,emscripten_exit_with_live_runtime:Mc,emscripten_get_heap_max:Nc,emscripten_get_now:Oc,emscripten_num_logical_cores:Pc,emscripten_promise_destroy:Qc,emscripten_promise_resolve:Rc,emscripten_resize_heap:Sc,environ_get:Tc,environ_sizes_get:Uc,exit:Vc,fd_close:Wc,fd_fdstat_get:Xc,
fd_read:Yc,fd_seek:Zc,fd_write:$c,ffi_call_js:ad,heif_color_conversion_options_ext_copy:bd,heif_color_conversion_options_ext_free:cd,heif_encoding_options_alloc:dd,heif_encoding_options_free:ed,heif_error_success:fd,heif_image_get_plane_readonly2:gd,heif_image_release:hd,heif_nclx_color_profile_alloc:jd,heif_nclx_color_profile_free:kd,heif_tai_clock_info_copy:ld,heif_tai_clock_info_release:md,heif_tai_timestamp_packet_copy:nd,heif_tai_timestamp_packet_release:od,invoke_di:pd,invoke_dii:qd,invoke_diii:rd,
invoke_diiiii:sd,invoke_ff:td,invoke_fi:ud,invoke_fii:vd,invoke_fiii:wd,invoke_i:xd,invoke_ii:yd,invoke_iii:zd,invoke_iiid:Ad,invoke_iiii:Bd,invoke_iiiii:Cd,invoke_iiiiid:Dd,invoke_iiiiii:Ed,invoke_iiiiiidii:Fd,invoke_iiiiiififff:Gd,invoke_iiiiiii:Hd,invoke_iiiiiiii:Id,invoke_iiiiiiiii:Jd,invoke_iiiiiiiiii:Kd,invoke_iiiiiiiiiii:Ld,invoke_iiiiiiiiiiii:Md,invoke_iiiiiiiiiiiii:Nd,invoke_iiiiij:Od,invoke_ji:Pd,invoke_jiiii:Qd,invoke_v:Rd,invoke_vi:Sd,invoke_vid:Td,invoke_viddi:Ud,invoke_vifff:Vd,invoke_vii:Wd,
invoke_viid:Xd,invoke_viidd:Yd,invoke_viiddi:Zd,invoke_viidi:$d,invoke_viii:ae,invoke_viiid:be,invoke_viiidddddi:ce,invoke_viiiddddi:de,invoke_viiidddi:ee,invoke_viiiddi:fe,invoke_viiidi:ge,invoke_viiii:he,invoke_viiiii:ie,invoke_viiiiii:je,invoke_viiiiiii:ke,invoke_viiiiiiidd:le,invoke_viiiiiiii:me,invoke_viiiiiiiii:ne,invoke_viiiiiiiiii:oe,invoke_viiiiiiiiiii:pe,invoke_viiiiiiiiiiii:qe,invoke_viiiiiiiiiiiii:re,invoke_viiiiiiiiiiiiiii:se,memory:ya,proc_exit:te,random_get:ue};var a=new Proxy(new Set(["__lsan_ignore_object"]),
ve);return{env:K,wasi_snapshot_preview1:K,"GOT.mem":a,"GOT.func":a}}
async function Ba(){function a(d,e){var f=Ua=d.exports;we(Ua);var g=xe(e);ye(Ua._emscripten_tls_init,d.exports,g);d=Ua;ze=d.pthread_self;Ae=d.malloc;n._main=d.main;L=d.free;Be=d.fflush;Ce=d.calloc;n.__ZnamSt11align_val_t=d._ZnamSt11align_val_t;De=d.__getTypeName;Ha=d._embind_initialize_bindings;n._emscripten_builtin_free=d.emscripten_builtin_free;Ee=d.emscripten_builtin_memalign;n._emscripten_builtin_malloc=d.emscripten_builtin_malloc;Fe=d.__funcs_on_exit;n.___libc_calloc=d.__libc_calloc;n.___libc_free=
d.__libc_free;n.___libc_malloc=d.__libc_malloc;Ge=d.__dl_seterr;He=d._emscripten_dlsync_self_async;Ie=d._emscripten_dlsync_self;Je=d._emscripten_proxy_dlsync_async;Ke=d._emscripten_proxy_dlsync;Le=d._emscripten_find_dylib;Ea=d._emscripten_thread_init;Ka=d._emscripten_thread_crashed;Me=d._emscripten_run_js_on_main_thread_done;Ne=d._emscripten_run_js_on_main_thread;Oe=d._emscripten_thread_free_data;Pe=d._emscripten_thread_exit;n._strndup=d.strndup;Qe=d._emscripten_check_mailbox;n.__ZdaPvm=d._ZdaPvm;
n.___libc_realloc=d.__libc_realloc;n._emscripten_builtin_calloc=d.emscripten_builtin_calloc;n._emscripten_builtin_realloc=d.emscripten_builtin_realloc;n._malloc_size=d.malloc_size;n._malloc_usable_size=d.malloc_usable_size;n._reallocf=d.reallocf;Re=d.emscripten_get_sbrk_ptr;M=d.setThrew;Se=d._emscripten_tempret_set;Te=d.emscripten_stack_set_limits;N=d._emscripten_stack_restore;Ue=d._emscripten_stack_alloc;O=d.emscripten_stack_get_current;Ve=d.__cxa_decrement_exception_refcount;We=d.__cxa_increment_exception_refcount;
Xe=d.__get_exception_message;Ye=d.__cxa_can_catch;Ze=d.__cxa_get_exception_ptr;$e=d.__indirect_function_table;af=d.__heap_base.value;bf(f);cf("__main__",0,K);df();na=e;return Ua}var b=$a();if(n.instantiateWasm)return new Promise(d=>{n.instantiateWasm(b,(e,f)=>{d(a(e,f))})});if(t){var c=new WebAssembly.Instance(na,$a());return a(c,na)}Wa??=ha("vips.wasm");return function(d){return a(d.instance,d.module)}(await Za(b))}var ff=a=>{if(!(a instanceof ef||"unwind"==a))throw a;};
class ef{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`;this.status=a}}
var gf=0,hf=a=>{a.terminate();a.onmessage=()=>{}},of=a=>{var b=jf[a];kf.delete(a);a in lf&&lf[a].resolve();a=b.Y;delete jf[a];mf.push(b);nf.splice(nf.indexOf(b),1);b.Y=0;Oe(a)},Ta=a=>{for(;0<a.length;)a.shift()(n)},pf=[],qf=a=>{kf.add(a);a in lf&&lf[a].resolve()},rf=0,sf=null,tf=()=>{rf--;n.monitorRunDependencies?.(rf);if(0==rf&&sf){var a=sf;sf=null;a()}},uf=()=>{rf++;n.monitorRunDependencies?.(rf)},xf=a=>{0==mf.length&&(vf(),wf(mf[0]));var b=mf.pop();if(!b)return 6;nf.push(b);jf[a.Y]=b;b.Y=a.Y;b.postMessage({W:"run",
tc:a.sc,Fa:a.Fa,Y:a.Y},a.ub);return 0},mf=[],nf=[],yf=[],jf={};function zf(){for(var a=6<navigator.hardwareConcurrency?navigator.hardwareConcurrency:6;a--;)vf();pf.push(async()=>{var b=Af();uf("loading-workers");await b;tf("loading-workers")});lf={};kf=new Set}var Bf=()=>{for(var a of nf)hf(a);for(a of mf)hf(a);mf=[];nf=[];jf={}};function Fa(){yf.forEach(a=>a())}
var wf=a=>new Promise(b=>{a.onmessage=f=>{var g=f.data;f=g.W;if(g.Ea&&g.Ea!=ze()){var h=jf[g.Ea];h?h.postMessage(g,g.ub):v(`Internal error! Worker sent a message "${f}" to target pthread ${g.Ea}, but that thread no longer exists!`)}else if("checkMailbox"===f)Ja();else if("spawnThread"===f)xf(g);else if("cleanupThread"===f)Cf(()=>of(g.Va));else if("markAsFinished"===f)qf(g.Va);else if("loaded"===f)a.loaded=!0,b(a);else if("setimmediate"===g.target)a.postMessage(g);else if("callHandler"===f)n[g.Sb](...g.Bb);
else f&&v(`worker sent an unknown command ${f}`)};a.onerror=f=>{v(`${"worker sent an error!"} ${f.filename}:${f.lineno}: ${f.message}`);throw f;};var c=[],d=["onExit","onAbort","print","printErr"],e;for(e of d)n.propertyIsEnumerable(e)&&c.push(e);a.postMessage({W:"load",Tb:c,wc:ya,xc:na,Hb:la,qc:va})});async function Af(){if(!t)return Promise.all(mf.map(wf))}
function vf(){var a=_scriptName;n.mainScriptUrlOrBlob&&(a=n.mainScriptUrlOrBlob,"string"!=typeof a&&(a=URL.createObjectURL(a)));a=new Worker(a,{name:"em-pthread"});mf.push(a)}var kf,lf,Df,P=(a,b,...c)=>{var d=16*c.length,e=O(),f=Ue(d),g=f>>3,h;for(h of c)"bigint"==typeof h?(F[g++]=1n,F[g++]=h):(F[g++]=0n,Ma[g++]=h);a=Ne(a,0,d,f,b);N(e);return a};function te(a){if(t)return P(0,1,a);pa=a;Ef||0<gf||(Bf(),n.onExit?.(a),oa=!0);throw new ef(a);}te.g="vi";function Ff(a){if(t)return P(1,0,a);Vc(a)}
var Vc=a=>{pa=a;if(t)throw Ff(a),"unwind";if(!(Ef||0<gf||t)){Fe();FS.Ja=!1;Be(0);for(var b of FS.streams)b&&FS.close(b);Bf();Qa=!0}te(a)};Vc.g="vi";var Cf=a=>{if(!Qa&&!oa)try{return a()}catch(b){ff(b)}finally{if(!(Qa||Ef||0<gf))try{t?ze()&&Pe(pa):Vc(pa)}catch(b){ff(b)}}},Gf=a=>{gf+=1;setTimeout(()=>{--gf;Cf(a)},1E4)},Hf=[],If={},Jf=!1;
function Kf(){function a(){Jf=document.pointerLockElement===n.canvas}if(!Lf){Lf=!0;Hf.push({canHandle:c=>!n.noImageDecoding&&/\.(jpg|jpeg|png|bmp|webp)$/i.test(c),handle:async(c,d)=>{var e=new Blob([c],{type:Mf(d)});e.size!==c.length&&(e=new Blob([(new Uint8Array(c)).buffer],{type:Mf(d)}));var f=URL.createObjectURL(e);return new Promise((g,h)=>{var k=new Image;k.onload=()=>{var l=document.createElement("canvas");l.width=k.width;l.height=k.height;l.getContext("2d").drawImage(k,0,0);URL.revokeObjectURL(f);
g(c)};k.onerror=()=>{v(`Image ${f} could not be decoded`);h()};k.src=f})}});Hf.push({canHandle:c=>!n.noAudioDecoding&&c.slice(-4)in{".ogg":1,".wav":1,".mp3":1},handle:async(c,d)=>new Promise(e=>{function f(){g||(g=!0,e(c))}var g=!1,h=URL.createObjectURL(new Blob([c],{type:Mf(d)})),k=new Audio;k.addEventListener("canplaythrough",()=>f(k),!1);k.onerror=()=>{if(!g){v(`warning: browser could not fully decode audio ${d}, trying slower base64 approach`);for(var l="",m=0,p=0,r=0;r<c.length;r++)for(m=m<<
8|c[r],p+=8;6<=p;){var q=m>>p-6&63;p-=6;l+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[q]}2==p?(l+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(m&3)<<4],l+="=="):4==p&&(l+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(m&15)<<2],l+="=");k.src="data:audio/x-"+d.slice(-3)+";base64,"+l;f(k)}};k.src=h;Gf(()=>{f(k)})})});var b=n.canvas;b&&(document.addEventListener("pointerlockchange",a,!1),n.elementPointerLock&&b.addEventListener("click",
c=>{!Jf&&n.canvas.requestPointerLock&&(n.canvas.requestPointerLock(),c.preventDefault())},!1))}}function Mf(a){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[a.slice(a.lastIndexOf(".")+1)]}var Nf={},Lf,Of={},ve={get(a,b){var c=Of[b];c||=Of[b]=new WebAssembly.Global({value:"i32",mutable:!0},-1);a.has(b)||(c.required=!0);return c}},Pf=[];function Da(a){var b=E[a+52>>2];Te(b,b-E[a+56>>2]);N(b)}
var Qf=new TextDecoder,Rf=(a,b,c,d)=>{c=b+c;if(d)return c;for(;a[b]&&!(b>=c);)++b;return b},Sf=(a,b=0,c)=>{c=Rf(a,b,c);return Qf.decode(a.buffer?a.buffer instanceof ArrayBuffer?a.subarray(b,c):a.slice(b,c):new Uint8Array(a.slice(b,c)))},xe=a=>{function b(){for(var p=0,r=1;;){var q=a[f++];p+=(q&127)*r;r*=128;if(!(q&128))break}return p}function c(){var p=b();f+=p;return Sf(a,f-p,p)}function d(){for(var p=b(),r=[];p--;)r.push(c());return r}function e(p,r){if(p)throw Error(r);}var f=0,g=0;if(a instanceof
WebAssembly.Module)g=WebAssembly.Module.customSections(a,"dylink.0"),e(0===g.length,"need dylink section"),a=new Uint8Array(g[0]),g=a.length;else{g=1836278016==(new Uint32Array((new Uint8Array(a.subarray(0,24))).buffer))[0];e(!g,"need to see wasm magic number");e(0!==a[8],"need the dylink section to be first");f=9;g=b();g=f+g;var h=c();e("dylink.0"!==h)}for(h={Pa:[],tb:new Set,wb:new Set,qb:[]};f<g;){var k=a[f++],l=b();if(1===k)h.Oa=b(),h.ac=b(),h.va=b(),h.Rc=b();else if(2===k)h.Pa=d();else if(3===
k)for(k=b();k--;){l=c();var m=b();m&256&&h.tb.add(l)}else if(4===k)for(k=b();k--;)c(),l=c(),m=b(),1==(m&3)&&h.wb.add(l);else 5===k?h.qb=d():f+=l}return h},Tf=[],Q=a=>{var b=Tf[a];b||(Tf[a]=b=$e.get(a));return b},Ia=(a,b)=>{Ef=gf=0;Ie();a=Q(a)(b);Ef||0<gf?pa=a:Pe(a)},cf=(a,b,c)=>{c={Ca:Infinity,name:a,exports:c,global:!0};Uf[a]=c;void 0!=b&&(Vf[b]=c);return c},Uf={},Vf={},Wf=(a,b)=>Math.ceil(a/b)*b,Xf=a=>{if(Pa)return Ce(a,1);var b=af;af=a=b+16*Math.ceil(a/16);if(!t){var c=Re();E[c>>2]=a}return b},
Zf=(a,b)=>{if(Yf)for(var c=a;c<a+b;c++){var d=Q(c);d&&Yf.set(d,c)}},Yf,$f=a=>{Yf||(Yf=new WeakMap,Zf(0,$e.length));return Yf.get(a)||0},ag=[],bg=a=>{const b=a.length;return[b%128|128,b>>7,...a]},cg={i:127,p:127,j:126,f:125,d:124,e:111},dg=a=>bg(Array.from(a,b=>cg[b])),eg=(a,b)=>{var c=$f(a);if(c)return c;c=ag.length?ag.pop():$e.grow(1);try{$e.set(c,a),Tf[c]=$e.get(c)}catch(d){if(!(d instanceof TypeError))throw d;b=Uint8Array.of(0,97,115,109,1,0,0,0,1,...bg([1,96,...dg(b.slice(1)),...dg("v"===b[0]?
"":b[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);b=new WebAssembly.Module(b);b=(new WebAssembly.Instance(b,{e:{f:a}})).exports.f;$e.set(c,b);Tf[c]=$e.get(c)}Yf.set(a,c);return c},bf=(a,b)=>{for(var c in a){var d=c;if(!"memory __memory_base __table_base __stack_pointer __indirect_function_table __cpp_exception __c_longjmp __wasm_apply_data_relocs __dso_handle __tls_size __tls_align __set_stack_limits _emscripten_tls_init __wasm_init_tls __wasm_call_ctors __start_em_asm __stop_em_asm __start_em_js __stop_em_js".split(" ").includes(d)&&
!d.startsWith("__em_js__")){d=a[c];var e=Of[c]&&-1!=Of[c].value;if(b||!e){if("function"==typeof d)d=eg(d);else if("number"!=typeof d.value)continue;let f;Of[f=c]??(Of[f]=new WebAssembly.Global({value:"i32",mutable:!0}));Of[c].value=d}}}},fg=(a,b=0)=>{var c={},d;for(d in a){var e=d;var f=a[d];a:{if(f instanceof WebAssembly.Global)try{f.value=f.value}catch{var g=!0;break a}g=!1}f=g?new WebAssembly.Global({value:"i32"},f.value+b):f;c[e]=f}return c},gg=a=>{a=K[a];return!a||a.J?!1:!0},hg=(a,b)=>Object.defineProperty(b,
"name",{value:a}),ig=(a,b=[])=>Q(a)(...b),jg=a=>(b,...c)=>{var d=O();try{return ig(b,c)}catch(e){N(d);if(!(e instanceof w))throw e;M(1,0);if("j"==a[0])return 0n}},lg=a=>{var b;gg(a)?b=K[a]:a.startsWith("invoke_")?b=K[a]=hg(a,jg(a.split("_")[1])):a.startsWith("__cxa_find_matching_catch_")&&(b=K[a]=hg(a,(...c)=>kg(c)));return{Ua:b,name:a}},Va=[],S=(a,b,c)=>a?Qf.decode(y.slice(a,Rf(y,a,b,c))):"",qg=(a,b,c,d,e)=>{function f(){function k(G,D){function H(Aa,ca){Aa=[];for(var Eb=0;;Eb++){var fb="$"+Eb;if(!ca.includes(fb))break;
Aa.push(fb)}Aa=Aa.join(",");mg[I]=eval(`(${Aa}) => { ${ca} };`)}function R(Aa,ca,Eb){var fb=[];ca=ca.slice(1,-1);if("void"!=ca){ca=ca.split(",");for(var ii of ca)ca=ii.split(" ").pop(),fb.push(ca.replaceAll("*",""))}q[Aa]=eval(`(${fb}) => ${Eb};`)}!t&&c&&(va[c]=G);Zf(r,g.va);q=fg(D.exports,p);bf(q);b.Ab||ng();if("__start_em_asm"in q){var I=q.__start_em_asm.value;for(G=q.__stop_em_asm.value;I<G;){var Na=S(I);H(I,Na);I=y.indexOf(0,I)+1}}for(var Fb in q)if(Fb.startsWith("__em_js__")){I=q[Fb].value;Na=
S(I);var [ji,ki]=Na.split("<::>");R(Fb.replace("__em_js__",""),ji,ki);delete q[Fb]}ye(q._emscripten_tls_init,D.exports,g);l&&((D=q.__wasm_apply_data_relocs)&&(Pa?D():Ra.push(D)),(D=q.__wasm_call_ctors)&&(Pa?D():Va.push(D)));return q}var l=!e||!x[e+8];if(l){var m=Math.pow(2,g.ac),p=g.Oa?Wf(Xf(g.Oa+m),m):0,r=g.va?$e.length:0;e&&(x[e+8]=1,E[e+12>>2]=p,C[e+16>>2]=g.Oa,E[e+20>>2]=r,C[e+24>>2]=g.va)}else p=E[e+12>>2],r=E[e+20>>2];g.va&&$e.grow(g.va);var q;m=new Proxy({},{get(G,D){switch(D){case "__memory_base":return p;
case "__table_base":return r}if(D in K&&!K[D].J)return K[D];if(!(D in G)){var H;G[D]=(...R)=>{if(!H){var I=lg(D).Ua;!I&&d&&(I=d[D]);I||=q[D];H=I}return H(...R)}}return G[D]}});var u=new Proxy(g.wb,ve),A={"GOT.mem":u,"GOT.func":u,env:m,wasi_snapshot_preview1:m};if(b.I)return(async()=>{var G;a instanceof WebAssembly.Module?G=new WebAssembly.Instance(a,A):{module:a,instance:G}=await WebAssembly.instantiate(a,A);return k(a,G)})();m=a instanceof WebAssembly.Module?a:new WebAssembly.Module(a);u=new WebAssembly.Instance(m,
A);return k(m,u)}var g=xe(a);b={...b,Ta:{fc:c,jc:g.qb}};if(b.I)return g.Pa.reduce((k,l)=>k.then(()=>{l=og(l,b.Ta)??l;return pg(l,b,d)}),Promise.resolve()).then(f);for(var h of g.Pa)h=og(h,b.Ta)??h,pg(h,b,d);return f()},we=a=>{var b,c;for([b,c]of Object.entries(a))gg(b)||(K[b]=c)},rg=async a=>{a=await ia(a);return new Uint8Array(a)},sg=(a,b)=>{for(var c=0,d=a.length-1;0<=d;d--){var e=a[d];"."===e?a.splice(d,1):".."===e?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c;c--)a.unshift("..");return a},
tg=a=>{var b="/"===a.charAt(0),c="/"===a.slice(-1);(a=sg(a.split("/").filter(d=>!!d),!b).join("/"))||b||(a=".");a&&c&&(a+="/");return(b?"/":"")+a},ug=a=>{var b=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);a=b[0];b=b[1];if(!a&&!b)return".";b&&=b.slice(0,-1);return a+b},vg=a=>a&&a.match(/([^\/]+|\/)\/*$/)[1],wg=(a,b)=>tg(a+"/"+b),xg=a=>{var b=O();a=a();N(b);return a},yg=a=>{for(var b=0,c=0;c<a.length;++c){var d=a.charCodeAt(c);127>=d?b++:2047>=d?b+=2:55296<=d&&57343>=
d?(b+=4,++c):b+=3}return b},zg=(a,b,c,d)=>{if(!(0<d))return 0;var e=c;d=c+d-1;for(var f=0;f<a.length;++f){var g=a.codePointAt(f);if(127>=g){if(c>=d)break;b[c++]=g}else if(2047>=g){if(c+1>=d)break;b[c++]=192|g>>6;b[c++]=128|g&63}else if(65535>=g){if(c+2>=d)break;b[c++]=224|g>>12;b[c++]=128|g>>6&63;b[c++]=128|g&63}else{if(c+3>=d)break;b[c++]=240|g>>18;b[c++]=128|g>>12&63;b[c++]=128|g>>6&63;b[c++]=128|g&63;f++}}b[c]=0;return c-e},Ag=a=>{var b=yg(a)+1,c=Ue(b);zg(a,y,c,b);return c},Bg=()=>a=>a.set(crypto.getRandomValues(new Uint8Array(a.byteLength))),
Cg=a=>{(Cg=Bg())(a)},Dg=(...a)=>{for(var b="",c=!1,d=a.length-1;-1<=d&&!c;d--){c=0<=d?a[d]:FS.cwd();if("string"!=typeof c)throw new TypeError("Arguments to path.resolve must be strings");if(!c)return"";b=c+"/"+b;c="/"===c.charAt(0)}b=sg(b.split("/").filter(e=>!!e),!c).join("/");return(c?"/":"")+b||"."},Eg=(a,b)=>{function c(g){for(var h=0;h<g.length&&""===g[h];h++);for(var k=g.length-1;0<=k&&""===g[k];k--);return h>k?[]:g.slice(h,k-h+1)}a=Dg(a).slice(1);b=Dg(b).slice(1);a=c(a.split("/"));b=c(b.split("/"));
for(var d=Math.min(a.length,b.length),e=d,f=0;f<d;f++)if(a[f]!==b[f]){e=f;break}d=[];for(f=e;f<a.length;f++)d.push("..");d=d.concat(b.slice(e));return d.join("/")},Fg=[],Gg=a=>{var b=Array(yg(a)+1);a=zg(a,b,0,b.length);b.length=a;return b},Hg=[];function Ig(a,b){Hg[a]={input:[],output:[],fa:b};FS.registerDevice(a,Jg)}
var Jg={open(a){var b=Hg[a.node.ta];if(!b)throw new FS.h(43);a.C=b;a.seekable=!1},close(a){a.C.fa.za(a.C)},za(a){a.C.fa.za(a.C)},read(a,b,c,d){if(!a.C||!a.C.fa.fb)throw new FS.h(60);for(var e=0,f=0;f<d;f++){try{var g=a.C.fa.fb(a.C)}catch(h){throw new FS.h(29);}if(void 0===g&&0===e)throw new FS.h(6);if(null===g||void 0===g)break;e++;b[c+f]=g}e&&(a.node.aa=Date.now());return e},write(a,b,c,d){if(!a.C||!a.C.fa.Ra)throw new FS.h(60);try{for(var e=0;e<d;e++)a.C.fa.Ra(a.C,b[c+e])}catch(f){throw new FS.h(29);
}d&&(a.node.P=a.node.O=Date.now());return e}},Kg={fb(){a:{if(!Fg.length){var a=null;globalThis.window?.prompt&&(a=window.prompt("Input: "),null!==a&&(a+="\n"));if(!a){a=null;break a}Fg=Gg(a)}a=Fg.shift()}return a},Ra(a,b){null===b||10===b?(ka(Sf(a.output)),a.output=[]):0!=b&&a.output.push(b)},za(a){0<a.output?.length&&(ka(Sf(a.output)),a.output=[])},Wb(){return{Dc:25856,Fc:5,Cc:191,Ec:35387,Bc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},Xb(){return 0},Yb(){return[24,
80]}},Lg={Ra(a,b){null===b||10===b?(v(Sf(a.output)),a.output=[]):0!=b&&a.output.push(b)},za(a){0<a.output?.length&&(v(Sf(a.output)),a.output=[])}},Mg=a=>{a=65536*Math.ceil(a/65536);var b=Ee(65536,a);b&&y.fill(0,b,b+a);return b},T={X:null,mount(){return T.createNode(null,"/",16895,0)},createNode(a,b,c,d){var e;(e=FS.isBlkdev(c))||(e=4096===(c&61440));if(e)throw new FS.h(63);T.X||(T.X={dir:{node:{T:T.m.T,V:T.m.V,ka:T.m.ka,da:T.m.da,rename:T.m.rename,unlink:T.m.unlink,rmdir:T.m.rmdir,ua:T.m.ua,symlink:T.m.symlink},
stream:{llseek:T.o.llseek}},file:{node:{T:T.m.T,V:T.m.V},stream:{llseek:T.o.llseek,read:T.o.read,write:T.o.write,la:T.o.la,na:T.o.na}},link:{node:{T:T.m.T,V:T.m.V,readlink:T.m.readlink},stream:{}},Xa:{node:{T:T.m.T,V:T.m.V},stream:FS.Db}});c=FS.createNode(a,b,c,d);FS.isDir(c.mode)?(c.m=T.X.dir.node,c.o=T.X.dir.stream,c.v={}):FS.isFile(c.mode)?(c.m=T.X.file.node,c.o=T.X.file.stream,c.M=0,c.v=T.Ib??(T.Ib=new Uint8Array(0))):FS.isLink(c.mode)?(c.m=T.X.link.node,c.o=T.X.link.stream):FS.isChrdev(c.mode)&&
(c.m=T.X.Xa.node,c.o=T.X.Xa.stream);c.aa=c.P=c.O=Date.now();a&&(a.v[b]=c,a.aa=a.P=a.O=c.aa);return c},m:{T(a){var b={};b.Fb=FS.isChrdev(a.mode)?a.id:1;b.Vb=a.id;b.mode=a.mode;b.bc=1;b.uid=0;b.Rb=0;b.ta=a.ta;FS.isDir(a.mode)?b.size=4096:FS.isFile(a.mode)?b.size=a.M:FS.isLink(a.mode)?b.size=a.link.length:b.size=0;b.aa=new Date(a.aa);b.P=new Date(a.P);b.O=new Date(a.O);b.Cb=4096;b.Wa=Math.ceil(b.size/b.Cb);return b},V(a,b){for(var c of["mode","atime","mtime","ctime"])null!=b[c]&&(a[c]=b[c]);void 0!==
b.size&&(b=b.size,a.M!=b&&(c=a.v,a.v=new Uint8Array(b),a.v.set(c.subarray(0,Math.min(b,a.M))),a.M=b))},ka(){T.Ga||(T.Ga=new FS.h(44),T.Ga.stack="<generic error, no stack>");throw T.Ga;},da(a,b,c,d){return T.createNode(a,b,c,d)},rename(a,b,c){try{var d=Ng(b,c)}catch(f){}if(d){if(FS.isDir(a.mode))for(var e in d.v)throw new FS.h(55);Og(d)}delete a.parent.v[a.name];b.v[c]=a;a.name=c;b.O=b.P=a.parent.O=a.parent.P=Date.now()},unlink(a,b){delete a.v[b];a.O=a.P=Date.now()},rmdir(a,b){var c=Ng(a,b),d;for(d in c.v)throw new FS.h(55);
delete a.v[b];a.O=a.P=Date.now()},ua(a){return[".","..",...Object.keys(a.v)]},symlink(a,b,c){a=T.createNode(a,b,41471,0);a.link=c;return a},readlink(a){if(!FS.isLink(a.mode))throw new FS.h(28);return a.link}},o:{read(a,b,c,d,e){if(e>=a.node.M)return 0;d=Math.min(a.node.M-e,d);b.set(a.node.v.subarray(e,e+d),c);return d},write(a,b,c,d,e,f){if(!d)return 0;a=a.node;a.P=a.O=Date.now();if(f)a.v=b.subarray(c,c+d),a.M=d;else if(0===a.M&&0===e)a.v=b.slice(c,c+d),a.M=d;else{f=e+d;var g=a.v.length;g>=f||(f=
Math.max(f,g*(1048576>g?2:1.125)>>>0),g&&(f=Math.max(f,256)),g=a.v.subarray(0,a.M),a.v=new Uint8Array(f),a.v.set(g));a.v.set(b.subarray(c,c+d),e);a.M=Math.max(a.M,e+d)}return d},llseek(a,b,c){1===c?b+=a.position:2===c&&FS.isFile(a.node.mode)&&(b+=a.node.M);if(0>b)throw new FS.h(28);return b},la(a,b,c,d,e){if(!FS.isFile(a.node.mode))throw new FS.h(43);a=a.node.v;if(e&2||a.buffer!==x.buffer){d=!0;e=Mg(b);if(!e)throw new FS.h(48);if(a){if(0<c||c+b<a.length)a.subarray?a=a.subarray(c,c+b):a=Array.prototype.slice.call(a,
c,c+b);x.set(a,e)}}else d=!1,e=a.byteOffset;return{s:e,ga:d}},na(a,b,c,d){T.o.write(a,b,0,d,c,!1);return 0}}},Pg=a=>{"string"==typeof a&&(a=Gg(a));a.subarray||(a=new Uint8Array(a));return a},Qg=(a,b)=>{var c=0;a&&(c|=365);b&&(c|=146);return c},Rg=async(a,b)=>{"undefined"!=typeof Nf&&Kf();for(var c of Hf)if(c.canHandle(b))return c.handle(a,b);return a},Sg=async(a,b,c,d,e,f,g,h)=>{var k=b?Dg(tg(a+"/"+b)):a,l=`cp ${k}`;uf(l);try{var m=c;"string"==typeof c&&(m=await rg(c));m=await Rg(m,k);h?.();f||FS.createDataFile(a,
b,m,d,e,g)}finally{tf(l)}};function Ng(a,b){var c=FS.isDir(a.mode)?(c=Tg(a,"x"))?c:a.m.ka?0:2:54;if(c)throw new FS.h(c);for(c=FS.ea[Ug(a.id,b)];c;c=c.ma){var d=c.name;if(c.parent.id===a.id&&d===b)return c}return FS.ka(a,b)}function Og(a){var b=Ug(a.parent.id,a.name);if(FS.ea[b]===a)FS.ea[b]=a.ma;else for(b=FS.ea[b];b;){if(b.ma===a){b.ma=a.ma;break}b=b.ma}}function Ug(a,b){for(var c=0,d=0;d<b.length;d++)c=(c<<5)-c+b.charCodeAt(d)|0;return(a+c>>>0)%FS.ea.length}
function Vg(a){var b=Ug(a.parent.id,a.name);a.ma=FS.ea[b];FS.ea[b]=a}function Tg(a,b){return FS.gb?0:b.includes("r")&&!(a.mode&292)||b.includes("w")&&!(a.mode&146)||b.includes("x")&&!(a.mode&73)?2:0}function Wg(a,b){if(!FS.isDir(a.mode))return 54;try{return Ng(a,b),20}catch(c){}return Tg(a,"wx")}
function Xg(a,b,c){try{var d=Ng(a,b)}catch(e){return e.A}if(a=Tg(a,"wx"))return a;if(c){if(!FS.isDir(d.mode))return 54;if(FS.pa(d)||FS.getPath(d)===FS.cwd())return 10}else if(FS.isDir(d.mode))return 31;return 0}function Yg(a,b){if(!a)throw new FS.h(b);return a}function U(a){a=FS.eb(a);if(!a)throw new FS.h(8);return a}function Zg(a,b=-1){a=Object.assign(new FS.yb,a);if(-1==b)a:{for(b=0;b<=FS.zb;b++)if(!FS.streams[b])break a;throw new FS.h(33);}a.ba=b;return FS.streams[b]=a}
function $g(a,b=-1){a=Zg(a,b);a.o?.Hc?.(a);return a}function ah(a,b,c){var d=a?.o.V;a=d?a:b;d??=b.m.V;Yg(d,63);d(a,c)}function bh(a){var b=[];for(a=[a];a.length;){var c=a.pop();b.push(c);a.push(...c.qa)}return b}function ch(a){var b={Ac:4096,Kc:4096,Wa:1E6,zc:5E5,yc:5E5,files:FS.Qa,Ic:FS.Qa-1,Lc:42,flags:2,Oc:255};a.m.sb&&Object.assign(b,a.m.sb(a.mount.dc.root));return b}function dh(a,b,c,d){ah(a,b,{mode:c&4095|b.mode&-4096,O:Date.now(),ab:d})}
function eh(a,b,c){if(FS.isDir(b.mode))throw new FS.h(31);if(!FS.isFile(b.mode))throw new FS.h(28);var d=Tg(b,"w");if(d)throw new FS.h(d);ah(a,b,{size:c,timestamp:Date.now()})}function fh(a,b,c,d){a="string"==typeof a?a:FS.getPath(a);b=tg(a+"/"+b);return FS.create(b,Qg(c,d))}
function gh(a){if(!(a.Zb||a.$b||a.link||a.v))if(globalThis.XMLHttpRequest)J("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");else try{a.v=ja(a.url)}catch(b){throw new FS.h(29);}}
var FS={root:null,qa:[],$a:{},streams:[],Qa:1,ea:null,Ya:"/",Ja:!1,gb:!0,Lb:null,Da:0,h:class{name="ErrnoError";constructor(a){this.A=a}},yb:class{R={};node=null;get object(){return this.node}set object(a){this.node=a}get flags(){return this.R.flags}set flags(a){this.R.flags=a}get position(){return this.R.position}set position(a){this.R.position=a}},xb:class{m={};o={};U=null;constructor(a,b,c,d){a||=this;this.parent=a;this.mount=a.mount;this.id=FS.Qa++;this.name=b;this.mode=c;this.ta=d;this.aa=this.P=
this.O=Date.now()}get read(){return 365===(this.mode&365)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return 146===(this.mode&146)}set write(a){a?this.mode|=146:this.mode&=-147}get $b(){return FS.isDir(this.mode)}get Zb(){return FS.isChrdev(this.mode)}},lookupPath(a,b={}){if(!a)throw new FS.h(44);b.ya??(b.ya=!0);"/"===a.charAt(0)||(a=FS.cwd()+"/"+a);var c=0;a:for(;40>c;c++){a=a.split("/").filter(h=>!!h);for(var d=FS.root,e="/",f=0;f<a.length;f++){var g=f===a.length-1;if(g&&b.parent)break;
if("."!==a[f])if(".."===a[f])if(e=ug(e),FS.pa(d)){a=e+"/"+a.slice(f+1).join("/");c--;continue a}else d=d.parent;else{e=tg(e+"/"+a[f]);try{d=Ng(d,a[f])}catch(h){if(44===h?.A&&g&&b.cc)return{path:e};throw h;}!d.U||g&&!b.ya||(d=d.U.root);if(FS.isLink(d.mode)&&(!g||b.follow)){if(!d.m.readlink)throw new FS.h(52);d=d.m.readlink(d);"/"===d.charAt(0)||(d=ug(e)+"/"+d);a=d+"/"+a.slice(f+1).join("/");continue a}}}return{path:e,node:d}}throw new FS.h(32);},getPath(a){for(var b;;){if(FS.pa(a))return a=a.mount.kb,
b?"/"!==a[a.length-1]?`${a}/${b}`:a+b:a;b=b?`${a.name}/${b}`:a.name;a=a.parent}},createNode(a,b,c,d){a=new FS.xb(a,b,c,d);Vg(a);return a},pa(a){return a===a.parent},isFile(a){return 32768===(a&61440)},isDir(a){return 16384===(a&61440)},isLink(a){return 40960===(a&61440)},isChrdev(a){return 8192===(a&61440)},isBlkdev(a){return 24576===(a&61440)},isSocket(a){return 49152===(a&49152)},zb:4096,eb:a=>FS.streams[a],Db:{open(a){a.o=FS.Nb(a.node.ta).o;a.o.open?.(a)},llseek(){throw new FS.h(70);}},Na:a=>a>>
8,Mc:a=>a&255,makedev:(a,b)=>a<<8|b,registerDevice(a,b){FS.$a[a]={o:b}},Nb:a=>FS.$a[a],syncfs(a,b){function c(h){FS.Da--;return b(h)}function d(h){if(h){if(!d.Jb)return d.Jb=!0,c(h)}else++f>=e.length&&c(null)}"function"==typeof a&&(b=a,a=!1);FS.Da++;1<FS.Da&&v(`warning: ${FS.Da} FS.syncfs operations in flight at once, probably just doing extra work`);var e=bh(FS.root.mount),f=0,g;for(g of e)g.type.syncfs?g.type.syncfs(g,a,d):d(null)},mount(a,b,c){var d="/"===c;if(d&&FS.root)throw new FS.h(10);if(!d&&
c){var e=FS.lookupPath(c,{ya:!1});c=e.path;e=e.node;if(e.U)throw new FS.h(10);if(!FS.isDir(e.mode))throw new FS.h(54);}b={type:a,dc:b,kb:c,qa:[]};a=a.mount(b);a.mount=b;b.root=a;d?FS.root=a:e&&(e.U=b,e.mount&&e.mount.qa.push(b));return a},unmount(a){a=FS.lookupPath(a,{ya:!1});if(!a.node.U)throw new FS.h(28);a=a.node;var b=a.U,c=bh(b);for([,e]of Object.entries(FS.ea))for(;e;){var d=e.ma;c.includes(e.mount)&&Og(e);var e=d}a.U=null;a.mount.qa.splice(a.mount.qa.indexOf(b),1)},ka(a,b){return a.m.ka(a,
b)},da(a,b,c){var d=FS.lookupPath(a,{parent:!0}).node;a=vg(a);if(!a)throw new FS.h(28);if("."===a||".."===a)throw new FS.h(20);var e=Wg(d,a);if(e)throw new FS.h(e);if(!d.m.da)throw new FS.h(63);return d.m.da(d,a,b,c)},sb(a){return ch(FS.lookupPath(a,{follow:!0}).node)},Qc(a){return ch(a.node)},create(a,b=438){return FS.da(a,b&4095|32768,0)},mkdir(a,b=511){return FS.da(a,b&1023|16384,0)},Nc(a,b){var c=a.split("/"),d="",e;for(e of c)if(e){if(d||"/"===a.charAt(0))d+="/";d+=e;try{FS.mkdir(d,b)}catch(f){if(20!=
f.A)throw f;}}},mkdev(a,b,c){"undefined"==typeof c&&(c=b,b=438);return FS.da(a,b|8192,c)},symlink(a,b){if(!Dg(a))throw new FS.h(44);var c=FS.lookupPath(b,{parent:!0}).node;if(!c)throw new FS.h(44);b=vg(b);var d=Wg(c,b);if(d)throw new FS.h(d);if(!c.m.symlink)throw new FS.h(63);return c.m.symlink(c,b,a)},rename(a,b){var c=ug(a),d=ug(b),e=vg(a),f=vg(b);var g=FS.lookupPath(a,{parent:!0});var h=g.node;g=FS.lookupPath(b,{parent:!0});g=g.node;if(!h||!g)throw new FS.h(44);if(h.mount!==g.mount)throw new FS.h(75);
var k=Ng(h,e);a=Eg(a,d);if("."!==a.charAt(0))throw new FS.h(28);a=Eg(b,c);if("."!==a.charAt(0))throw new FS.h(55);try{var l=Ng(g,f)}catch(m){}if(k!==l){b=FS.isDir(k.mode);if(e=Xg(h,e,b))throw new FS.h(e);if(e=l?Xg(g,f,b):Wg(g,f))throw new FS.h(e);if(!h.m.rename)throw new FS.h(63);if(k.U||l&&l.U)throw new FS.h(10);if(g!==h&&(e=Tg(h,"w")))throw new FS.h(e);Og(k);try{h.m.rename(k,g,f),k.parent=g}catch(m){throw m;}finally{Vg(k)}}},rmdir(a){var b=FS.lookupPath(a,{parent:!0}).node;a=vg(a);var c=Ng(b,a),
d=Xg(b,a,!0);if(d)throw new FS.h(d);if(!b.m.rmdir)throw new FS.h(63);if(c.U)throw new FS.h(10);b.m.rmdir(b,a);Og(c)},ua(a){a=FS.lookupPath(a,{follow:!0}).node;return Yg(a.m.ua,54)(a)},unlink(a){var b=FS.lookupPath(a,{parent:!0}).node;if(!b)throw new FS.h(44);a=vg(a);var c=Ng(b,a),d=Xg(b,a,!1);if(d)throw new FS.h(d);if(!b.m.unlink)throw new FS.h(63);if(c.U)throw new FS.h(10);b.m.unlink(b,a);Og(c)},readlink(a){a=FS.lookupPath(a).node;if(!a)throw new FS.h(44);if(!a.m.readlink)throw new FS.h(28);return a.m.readlink(a)},
stat(a,b){a=FS.lookupPath(a,{follow:!b}).node;return Yg(a.m.T,63)(a)},lstat(a){return FS.stat(a,!0)},chmod(a,b,c){a="string"==typeof a?FS.lookupPath(a,{follow:!c}).node:a;dh(null,a,b,c)},lchmod(a,b){FS.chmod(a,b,!0)},fchmod(a,b){a=U(a);dh(a,a.node,b,!1)},chown(a,b,c,d){a="string"==typeof a?FS.lookupPath(a,{follow:!d}).node:a;ah(null,a,{timestamp:Date.now(),ab:d})},lchown(a,b,c){FS.chown(a,b,c,!0)},fchown(a){a=U(a);ah(a,a.node,{timestamp:Date.now(),ab:!1})},truncate(a,b){if(0>b)throw new FS.h(28);
a="string"==typeof a?FS.lookupPath(a,{follow:!0}).node:a;eh(null,a,b)},ftruncate(a,b){a=U(a);if(0>b||0===(a.flags&2097155))throw new FS.h(28);eh(a,a.node,b)},utime(a,b,c){a=FS.lookupPath(a,{follow:!0}).node;Yg(a.m.V,63)(a,{aa:b,P:c})},open(a,b,c=438){if(""===a)throw new FS.h(44);if("string"==typeof b){var d={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[b];if("undefined"==typeof d)throw Error(`Unknown file open mode: ${b}`);b=d}c=b&64?c&4095|32768:0;if("object"==typeof a)d=a;else{var e=a.endsWith("/");
var f=FS.lookupPath(a,{follow:!(b&131072),cc:!0});d=f.node;a=f.path}f=!1;if(b&64)if(d){if(b&128)throw new FS.h(20);}else{if(e)throw new FS.h(31);d=FS.da(a,c|511,0);f=!0}if(!d)throw new FS.h(44);FS.isChrdev(d.mode)&&(b&=-513);if(b&65536&&!FS.isDir(d.mode))throw new FS.h(54);if(!f){e=d;a=b;if(e)if(FS.isLink(e.mode))e=32;else{var g=["r","w","rw"][a&3];a&512&&(g+="w");e=FS.isDir(e.mode)&&("r"!==g||a&576)?31:Tg(e,g)}else e=44;if(e)throw new FS.h(e);}b&512&&!f&&FS.truncate(d,0);b&=-131713;b=Zg({node:d,
path:FS.getPath(d),flags:b,seekable:!0,position:0,o:d.o,vc:[],error:!1});b.o.open&&b.o.open(b);f&&FS.chmod(d,c&511);return b},close(a){if(null===a.ba)throw new FS.h(8);a.Ha&&(a.Ha=null);try{a.o.close&&a.o.close(a)}catch(b){throw b;}finally{FS.streams[a.ba]=null}a.ba=null},llseek(a,b,c){if(null===a.ba)throw new FS.h(8);if(!a.seekable||!a.o.llseek)throw new FS.h(70);if(0!=c&&1!=c&&2!=c)throw new FS.h(28);a.position=a.o.llseek(a,b,c);a.vc=[];return a.position},read(a,b,c,d,e){if(0>d||0>e)throw new FS.h(28);
if(null===a.ba)throw new FS.h(8);if(1===(a.flags&2097155))throw new FS.h(8);if(FS.isDir(a.node.mode))throw new FS.h(31);if(!a.o.read)throw new FS.h(28);var f="undefined"!=typeof e;if(!f)e=a.position;else if(!a.seekable)throw new FS.h(70);b=a.o.read(a,b,c,d,e);f||(a.position+=b);return b},write(a,b,c,d,e,f){if(0>d||0>e)throw new FS.h(28);if(null===a.ba)throw new FS.h(8);if(0===(a.flags&2097155))throw new FS.h(8);if(FS.isDir(a.node.mode))throw new FS.h(31);if(!a.o.write)throw new FS.h(28);a.seekable&&
a.flags&1024&&FS.llseek(a,0,2);var g="undefined"!=typeof e;if(!g)e=a.position;else if(!a.seekable)throw new FS.h(70);b=a.o.write(a,b,c,d,e,f);g||(a.position+=b);return b},la(a,b,c,d,e){if(0!==(d&2)&&0===(e&2)&&2!==(a.flags&2097155))throw new FS.h(2);if(1===(a.flags&2097155))throw new FS.h(2);if(!a.o.la)throw new FS.h(43);if(!b)throw new FS.h(28);return a.o.la(a,b,c,d,e)},na(a,b,c,d,e){return a.o.na?a.o.na(a,b,c,d,e):0},Ka(a,b,c){if(!a.o.Ka)throw new FS.h(59);return a.o.Ka(a,b,c)},readFile(a,b={}){b.flags=
b.flags||0;b.encoding=b.encoding||"binary";"utf8"!==b.encoding&&"binary"!==b.encoding&&J(`Invalid encoding type "${b.encoding}"`);var c=FS.open(a,b.flags);a=FS.stat(a).size;var d=new Uint8Array(a);FS.read(c,d,0,a,0);"utf8"===b.encoding&&(d=Sf(d));FS.close(c);return d},writeFile(a,b,c={}){c.flags=c.flags||577;a=FS.open(a,c.flags,c.mode);b=Pg(b);FS.write(a,b,0,b.byteLength,void 0,c.Gc);FS.close(a)},cwd:()=>FS.Ya,chdir(a){a=FS.lookupPath(a,{follow:!0});if(null===a.node)throw new FS.h(44);if(!FS.isDir(a.node.mode))throw new FS.h(54);
var b=Tg(a.node,"x");if(b)throw new FS.h(b);FS.Ya=a.path},init(a,b,c){FS.Ja=!0;a??=n.stdin;b??=n.stdout;c??=n.stderr;a?FS.createDevice("/dev","stdin",a):FS.symlink("/dev/tty","/dev/stdin");b?FS.createDevice("/dev","stdout",null,b):FS.symlink("/dev/tty","/dev/stdout");c?FS.createDevice("/dev","stderr",null,c):FS.symlink("/dev/tty1","/dev/stderr");FS.open("/dev/stdin",0);FS.open("/dev/stdout",1);FS.open("/dev/stderr",1)},Jc(a,b){a=FS.analyzePath(a,b);return a.bb?a.object:null},analyzePath(a,b){try{var c=
FS.lookupPath(a,{follow:!b});a=c.path}catch(e){}var d={pa:!1,bb:!1,error:0,name:null,path:null,object:null,ec:!1,ic:null,hc:null};try{c=FS.lookupPath(a,{parent:!0}),d.ec=!0,d.ic=c.path,d.hc=c.node,d.name=vg(a),c=FS.lookupPath(a,{follow:!b}),d.bb=!0,d.path=c.path,d.object=c.node,d.name=c.node.name,d.pa="/"===c.path}catch(e){d.error=e.A}return d},createPath(a,b){a="string"==typeof a?a:FS.getPath(a);for(b=b.split("/").reverse();b.length;){var c=b.pop();if(c){var d=tg(a+"/"+c);try{FS.mkdir(d)}catch(e){if(20!=
e.A)throw e;}a=d}}return d},createDataFile(a,b,c,d,e,f){var g=b;a&&(a="string"==typeof a?a:FS.getPath(a),g=b?tg(a+"/"+b):a);a=Qg(d,e);g=FS.create(g,a);c&&(c=Pg(c),FS.chmod(g,a|146),b=FS.open(g,577),FS.write(b,c,0,c.length,0,f),FS.close(b),FS.chmod(g,a))},createDevice(a,b,c,d){a=wg("string"==typeof a?a:FS.getPath(a),b);b=Qg(!!c,!!d);var e;(e=FS.createDevice).Na??(e.Na=64);e=FS.makedev(FS.createDevice.Na++,0);FS.registerDevice(e,{open(f){f.seekable=!1},close(){d?.buffer?.length&&d(10)},read(f,g,h,k){for(var l=
0,m=0;m<k;m++){try{var p=c()}catch(r){throw new FS.h(29);}if(void 0===p&&0===l)throw new FS.h(6);if(null===p||void 0===p)break;l++;g[h+m]=p}l&&(f.node.aa=Date.now());return l},write(f,g,h,k){for(var l=0;l<k;l++)try{d(g[h+l])}catch(m){throw new FS.h(29);}k&&(f.node.P=f.node.O=Date.now());return l}});return FS.mkdev(a,b,e)},createLazyFile(a,b,c,d,e){function f(m,p,r,q,u){m=m.node.v;if(u>=m.length)return 0;q=Math.min(m.length-u,q);if(m.slice)for(var A=0;A<q;A++)p[r+A]=m[u+A];else for(A=0;A<q;A++)p[r+
A]=m.get(u+A);return q}class g{Ia=!1;R=[];oa=void 0;jb=0;ib=0;get(m){if(!(m>this.length-1||0>m)){var p=m%this.rb;return this.oa(m/this.rb|0)[p]}}uc(m){this.oa=m}lb(){var m=new XMLHttpRequest;m.open("HEAD",c,!1);m.send(null);200<=m.status&&300>m.status||304===m.status||J("Couldn't load "+c+". Status: "+m.status);var p=Number(m.getResponseHeader("Content-length")),r,q=(r=m.getResponseHeader("Accept-Ranges"))&&"bytes"===r;m=(r=m.getResponseHeader("Content-Encoding"))&&"gzip"===r;var u=1048576;q||(u=
p);var A=this;A.uc(G=>{var D=G*u,H=(G+1)*u-1;H=Math.min(H,p-1);if("undefined"==typeof A.R[G]){var R=A.R;D>H&&J("invalid range ("+D+", "+H+") or no bytes requested!");H>p-1&&J("only "+p+" bytes available! programmer error!");var I=new XMLHttpRequest;I.open("GET",c,!1);p!==u&&I.setRequestHeader("Range","bytes="+D+"-"+H);I.responseType="arraybuffer";I.overrideMimeType&&I.overrideMimeType("text/plain; charset=x-user-defined");I.send(null);200<=I.status&&300>I.status||304===I.status||J("Couldn't load "+
c+". Status: "+I.status);D=void 0!==I.response?new Uint8Array(I.response||[]):Gg(I.responseText||"");R[G]=D}"undefined"==typeof A.R[G]&&J("doXHR failed!");return A.R[G]});if(m||!p)u=p=1,u=p=this.oa(0).length,ka("LazyFiles on gzip forces download of the whole file when length is accessed");this.jb=p;this.ib=u;this.Ia=!0}get length(){this.Ia||this.lb();return this.jb}get rb(){this.Ia||this.lb();return this.ib}}if(globalThis.XMLHttpRequest){ba||J("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");
var h=new g;var k=void 0}else k=c,h=void 0;var l=fh(a,b,d,e);h?l.v=h:k&&(l.v=null,l.url=k);Object.defineProperties(l,{M:{get:function(){return this.v.length}}});a={};for(const [m,p]of Object.entries(l.o))a[m]=(...r)=>{gh(l);return p(...r)};a.read=(m,p,r,q,u)=>{gh(l);return f(m,p,r,q,u)};a.la=(m,p,r)=>{gh(l);var q=Mg(p);if(!q)throw new FS.h(48);f(m,x,q,p,r);return{s:q,ga:!0}};l.o=a;return l}},og=(a,b)=>{if(Pa){if("/"===a.charAt(0))try{return FS.lookupPath(a),a}catch(d){return}var c=(b?.jc||[]).map(d=>
{var e=b?.fc;return d.startsWith("$ORIGIN")?d.replace("$ORIGIN",ug(e)):d});return xg(()=>{var d=Ue(512),e=Ag(c.join(":")),f=Ag(a);return(d=Le(d,e,f,512))?S(d):void 0})}};
function pg(a,b={global:!0,ra:!0},c,d){function e(){var k=va[a];if(k)return b.I?Promise.resolve(k):k;if(d){k=E[d+28>>2];var l=E[d+32>>2];if(k&&l)return k=x.slice(k,k+l),b.I?Promise.resolve(k):k}if(k=og(a,b.Ta))return k=FS.readFile(k,{encoding:"binary"}),b.I?Promise.resolve(k):k;k=ha(a);if(b.I)return rg(k);if(!ja)throw Error(`${k}: file not found, and synchronous loading of external files is not available`);return ja(k)}function f(){var k=If[a];return k?b.I?Promise.resolve(k):k:b.I?e().then(l=>qg(l,
b,a,c,d)):qg(e(),b,a,c,d)}function g(k){h.global?we(k):c&&Object.assign(c,k);h.exports=k}var h=Uf[a];if(h)return b.global?h.global||(h.global=!0,we(h.exports)):c&&Object.assign(c,h.exports),b.ra&&Infinity!==h.Ca&&(h.Ca=Infinity),h.Ca++,d&&(Vf[d]=h),b.I?Promise.resolve(!0):!0;h=cf(a,d,"loading");h.Ca=b.ra?Infinity:1;h.global=b.global;if(b.I)return f().then(k=>{g(k);return!0});g(f());return!0}
var ng=()=>{var a,b;for([a,b]of Object.entries(Of))if(-1==b.value){var c=lg(a).Ua;if(c||b.required)if("function"==typeof c)b.value=eg(c,c.g);else if("number"==typeof c)b.value=c;else if("number"==typeof c.value)b.value=c;else throw Error(`bad export type for '${a}': ${typeof c} (${c})`);else b.value=0}},df=async()=>{if(la.length){uf("loadDylibs");for(var a of la)await pg(a,{I:!0,global:!0,ra:!0,Ab:!0});ng();tf("loadDylibs")}else ng()},Ef=!1,ye=(a,b,c)=>{function d(){var e=a();if(e){var f={};c.tb.forEach(g=>
f[g]=b[g]);bf(fg(f,e),!0)}}yf.push(d);Pa&&d()},ya,ab=(a,b,c,d)=>J(`Assertion failed: ${S(a)}, at: `+[b?S(b):"unknown filename",c,d?S(d):"unknown function"]);ab.g="vppip";var bb=(a,b)=>Q(a)(b);bb.g="vpi";var hh=[],ih=0,cb=a=>{var b=new jh(a);0==x[b.s+12]&&(x[b.s+12]=1,ih--);x[b.s+13]=0;hh.push(b);return Ze(a)};cb.g="pp";var kh=0,db=()=>{M(0,0);var a=hh.pop();Ve(a.ha);kh=0};db.g="v";class jh{constructor(a){this.ha=a;this.s=a-24}init(a,b){E[this.s+16>>2]=0;E[this.s+4>>2]=a;E[this.s+8>>2]=b}}
var kg=a=>{var b=kh?.ha;if(!b)return Se(0),0;var c=new jh(b);E[c.s+16>>2]=b;var d=E[c.s+4>>2];if(!d)return Se(0),b;for(var e of a){if(0===e||e===d)break;if(Ye(e,d,c.s+16))return Se(e),b}Se(d);return b},eb=()=>kg([]);eb.g="p";var gb=a=>kg([a]);gb.g="pp";var hb=()=>{var a=hh.pop();a||J("no exception to throw");var b=a.ha;0==x[a.s+13]&&(hh.push(a),x[a.s+13]=1,x[a.s+12]=0,ih++);We(b);kh=new ra(b);throw kh;};hb.g="v";var ib=(a,b,c)=>{(new jh(a)).init(b,c);We(a);kh=new ra(a);ih++;throw kh;};ib.g="vppp";
var jb=()=>ih;jb.g="i";function kb(...a){return K.__lsan_ignore_object(...a)}kb.J=!0;function lh(a,b,c,d){return t?P(2,1,a,b,c,d):lb(a,b,c,d)}var lb=(a,b,c,d)=>{if(!globalThis.SharedArrayBuffer)return 6;var e=[];if(t&&0===e.length)return lh(a,b,c,d);a={sc:c,Y:a,Fa:d,ub:e};return t?(a.W="spawnThread",postMessage(a,e),0):xf(a)};lb.g="ipppp";var mb=a=>{kh||=new ra(a);throw kh;};mb.g="vp";
function mh(a,b,c){if("/"===b.charAt(0))return b;a=-100===a?FS.cwd():U(a).path;if(0==b.length){if(!c)throw new FS.h(44);return a}return a+"/"+b}
function nh(a,b){E[a>>2]=b.Fb;E[a+4>>2]=b.mode;E[a+8>>2]=b.bc;E[a+12>>2]=b.uid;E[a+16>>2]=b.Rb;E[a+20>>2]=b.ta;F[a+24>>3]=BigInt(b.size);C[a+32>>2]=4096;C[a+36>>2]=b.Wa;var c=b.aa.getTime(),d=b.P.getTime(),e=b.O.getTime();F[a+40>>3]=BigInt(Math.floor(c/1E3));E[a+48>>2]=c%1E3*1E6;F[a+56>>3]=BigInt(Math.floor(d/1E3));E[a+64>>2]=d%1E3*1E6;F[a+72>>3]=BigInt(Math.floor(e/1E3));E[a+80>>2]=e%1E3*1E6;F[a+88>>3]=BigInt(b.Vb);return 0}var oh=void 0;
function nb(a){if(t)return P(3,1,a);try{var b=U(a);return $g(b).ba}catch(c){if("undefined"==typeof FS||"ErrnoError"!==c.name)throw c;return-c.A}}nb.g="ii";function ob(a,b,c,d){if(t)return P(4,1,a,b,c,d);try{b=S(b);b=mh(a,b);if(c&-8)return-28;var e=FS.lookupPath(b,{follow:!0}).node;if(!e)return-44;a="";c&4&&(a+="r");c&2&&(a+="w");c&1&&(a+="x");return a&&Tg(e,a)?-2:0}catch(f){if("undefined"==typeof FS||"ErrnoError"!==f.name)throw f;return-f.A}}ob.g="iipii";var ph=()=>{var a=C[+oh>>2];oh+=4;return a};
function pb(a,b,c){if(t)return P(5,1,a,b,c);oh=c;try{var d=U(a);switch(b){case 0:var e=ph();if(0>e)break;for(;FS.streams[e];)e++;return $g(d,e).ba;case 1:case 2:return 0;case 3:return d.flags;case 4:return e=ph(),d.flags|=e,0;case 12:return e=ph(),z[e+0>>1]=2,0;case 13:case 14:return 0}return-28}catch(f){if("undefined"==typeof FS||"ErrnoError"!==f.name)throw f;return-f.A}}pb.g="iiip";
function qb(a,b){if(t)return P(6,1,a,b);try{var c=U(a),d=c.node,e=c.o.T;a=e?c:d;e??=d.m.T;Yg(e,63);var f=e(a);return nh(b,f)}catch(g){if("undefined"==typeof FS||"ErrnoError"!==g.name)throw g;return-g.A}}qb.g="iip";function rb(a,b){if(t)return P(7,1,a,b);b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return-61;FS.ftruncate(a,b);return 0}catch(c){if("undefined"==typeof FS||"ErrnoError"!==c.name)throw c;return-c.A}}rb.g="iij";
function sb(a,b){if(t)return P(8,1,a,b);try{if(0===b)return-28;var c=FS.cwd(),d=yg(c)+1;if(b<d)return-68;zg(c,y,a,b);return d}catch(e){if("undefined"==typeof FS||"ErrnoError"!==e.name)throw e;return-e.A}}sb.g="ipp";
function tb(a,b,c){if(t)return P(9,1,a,b,c);oh=c;try{var d=U(a);switch(b){case 21509:return d.C?0:-59;case 21505:if(!d.C)return-59;if(d.C.fa.Wb){a=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var e=ph();C[e>>2]=25856;C[e+4>>2]=5;C[e+8>>2]=191;C[e+12>>2]=35387;for(var f=0;32>f;f++)x[e+f+17]=a[f]||0}return 0;case 21510:case 21511:case 21512:return d.C?0:-59;case 21506:case 21507:case 21508:if(!d.C)return-59;if(d.C.fa.Xb)for(e=ph(),a=[],f=0;32>f;f++)a.push(x[e+f+17]);
return 0;case 21519:if(!d.C)return-59;e=ph();return C[e>>2]=0;case 21520:return d.C?-28:-59;case 21537:case 21531:return e=ph(),FS.Ka(d,b,e);case 21523:if(!d.C)return-59;d.C.fa.Yb&&(f=[24,80],e=ph(),z[e>>1]=f[0],z[e+2>>1]=f[1]);return 0;case 21524:return d.C?0:-59;case 21515:return d.C?0:-59;default:return-28}}catch(g){if("undefined"==typeof FS||"ErrnoError"!==g.name)throw g;return-g.A}}tb.g="iiip";
function ub(a,b){if(t)return P(10,1,a,b);try{return a=S(a),nh(b,FS.lstat(a))}catch(c){if("undefined"==typeof FS||"ErrnoError"!==c.name)throw c;return-c.A}}ub.g="ipp";function vb(a,b,c,d){if(t)return P(11,1,a,b,c,d);try{b=S(b);var e=d&256;b=mh(a,b,d&4096);return nh(c,e?FS.lstat(b):FS.stat(b))}catch(f){if("undefined"==typeof FS||"ErrnoError"!==f.name)throw f;return-f.A}}vb.g="iippi";
function wb(a,b,c,d){if(t)return P(12,1,a,b,c,d);oh=d;try{b=S(b);b=mh(a,b);var e=d?ph():0;return FS.open(b,c,e).ba}catch(f){if("undefined"==typeof FS||"ErrnoError"!==f.name)throw f;return-f.A}}wb.g="iipip";
function xb(a,b,c){if(t)return P(13,2,a,b,c);try{const u=Df;var d,e=new Promise(D=>{d=D}),f=[],g=!1;function A(D){g||(g=!0,f.forEach(H=>H()),d(D))}function G(D,H){return R=>{g||(R&=z[H+4>>1]|24,z[H+6>>1]=R,A(1))}}if(u&&0<c){var h=setTimeout(()=>{A(0)},c);f.push(()=>clearTimeout(h))}for(var k=0,l=0;l<b;l++){var m=a+8*l,p=z[m+4>>1],r=32,q=FS.eb(C[m>>2]);q&&(q.o.mb?r=u&&c?q.o.mb(q,c,G(q,m)):q.o.mb(q,-1):r=5);(r&=p|24)&&k++;z[m+6>>1]=r}return u?(!k&&c||A(k),e):k}catch(u){if("undefined"==typeof FS||"ErrnoError"!==
u.name)throw u;return-u.A}}xb.g="ipii";function yb(a){if(t)return P(14,1,a);try{return a=S(a),FS.rmdir(a),0}catch(b){if("undefined"==typeof FS||"ErrnoError"!==b.name)throw b;return-b.A}}yb.g="ip";function zb(a,b){if(t)return P(15,1,a,b);try{return a=S(a),nh(b,FS.stat(a))}catch(c){if("undefined"==typeof FS||"ErrnoError"!==c.name)throw c;return-c.A}}zb.g="ipp";
function Ab(a,b,c){if(t)return P(16,1,a,b,c);try{b=S(b);b=mh(a,b);if(c)if(512===c)FS.rmdir(b);else return-28;else FS.unlink(b);return 0}catch(d){if("undefined"==typeof FS||"ErrnoError"!==d.name)throw d;return-d.A}}Ab.g="iipi";var Bb=()=>J("");Bb.g="v";
var qh=a=>{var b=O();a=Ag(a);Ge(a,0);N(b)},rh=(a,b)=>{var c=S(a+36),d=C[a+4>>2];c=tg(c);var e=!!(d&256),f=e?null:{};d={global:e,ra:!!(d&4096),I:b.I};if(b.I)return pg(c,d,f,a);try{return pg(c,d,f,a)}catch(g){return qh(`could not load dynamic lib: ${c}\n${g}`),0}},Cb=a=>rh(a,{I:!1});Cb.g="pp";var Db=(a,b)=>{a=Vf[a].exports;b=Object.keys(a)[b];b=a[b];return eg(b,b.g)};Db.g="ppi";
var Gb=(a,b,c)=>{b=S(b);var d=Vf[a];a=Object.keys(d.exports).indexOf(b);if(-1==a||d.exports[b].J)return qh(`Tried to lookup unknown symbol "${b}" in dynamic lib: ${d.name}`),0;b=d.exports[b];"function"==typeof b&&((d=$f(b))?b=d:(b=eg(b,b.g),E[c>>2]=a));return b};Gb.g="pppp";var sh={},th=a=>{for(;a.length;){var b=a.pop();a.pop()(b)}};function uh(a){return this.B(E[a>>2])}
var vh={},wh={},xh={},yh=class extends Error{constructor(a){super(a);this.name="InternalError"}},zh=(a,b,c)=>{function d(h){h=c(h);if(h.length!==a.length)throw new yh("Mismatched type converter count");for(var k=0;k<a.length;++k)V(a[k],h[k])}a.forEach(h=>xh[h]=b);var e=Array(b.length),f=[],g=0;for(let [h,k]of b.entries())wh.hasOwnProperty(k)?e[h]=wh[k]:(f.push(k),vh.hasOwnProperty(k)||(vh[k]=[]),vh[k].push(()=>{e[h]=wh[k];++g;g===f.length&&d(e)}));0===f.length&&d(e)},Hb=a=>{var b=sh[a];delete sh[a];
var c=b.Sa,d=b.Z,e=b.cb,f=e.map(g=>g.Qb).concat(e.map(g=>g.oc));zh([a],f,g=>{var h={},k,l;for([k,l]of e.entries()){const m=g[k],p=l.oa,r=l.Pb,q=g[k+e.length],u=l.nc,A=l.pc;h[l.Kb]={read:G=>m.B(p(r,G)),write:(G,D)=>{var H=[];u(A,G,q.F(H,D));th(H)},optional:m.optional}}return[{name:b.name,B:m=>{var p={},r;for(r in h)p[r]=h[r].read(m);d(m);return p},F:(m,p)=>{for(var r in h)if(!(r in p||h[r].optional))throw new TypeError(`Missing field: "${r}"`);var q=c();for(r in h)h[r].write(q,p[r]);null!==m&&m.push(d,
q);return q},L:uh,H:d}]})};Hb.g="vp";var W=a=>{for(var b="";;){var c=y[a++];if(!c)return b;b+=String.fromCharCode(c)}},X=class extends Error{constructor(a){super(a);this.name="BindingError"}},Ah=a=>{throw new X(a);};
function Bh(a,b,c={}){var d=b.name;if(!a)throw new X(`type "${d}" must have a positive integer typeid pointer`);if(wh.hasOwnProperty(a)){if(c.Ub)return;throw new X(`Cannot register type '${d}' twice`);}wh[a]=b;delete xh[a];vh.hasOwnProperty(a)&&(b=vh[a],delete vh[a],b.forEach(e=>e()))}function V(a,b,c={}){return Bh(a,b,c)}
var Ib=(a,b,c,d,e)=>{b=W(b);if(d)a:switch(c){case 4:d=La;break a;case 8:d=Ma;break a;default:throw new TypeError(`invalid float width (${c}): ${b}`);}else a:switch(c){case 1:d=e?x:y;break a;case 2:d=e?z:B;break a;case 4:d=e?C:E;break a;case 8:d=e?F:Oa;break a;default:throw new TypeError(`invalid integer width (${c}): ${b}`);}var f=d,g=Math.log2(c);V(a,{name:b,B:h=>{var k=h+Math.max(4,c)>>g;k=Array.from(f.subarray(k,k+E[h>>2]));L(h);return k},F:(h,k)=>{"number"==typeof k&&(k=[k]);if(!Array.isArray(k))throw new X(`Cannot pass non-array to C++ vector type ${b}`);
k=Array.prototype.concat.apply([],k);var l=k.length,m=Math.max(4,c),p=Ae(m+l*c);m=p+m>>g;E[p>>2]=l;f.set(k,m);null!==h&&h.push(L,p);return p},L:uh,H(h){L(h)}})};Ib.g="vpppii";
var Ch=(a,b,c)=>{switch(b){case 1:return c?d=>x[d]:d=>y[d];case 2:return c?d=>z[d>>1]:d=>B[d>>1];case 4:return c?d=>C[d>>2]:d=>E[d>>2];case 8:return c?d=>F[d>>3]:d=>Oa[d>>3];default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},Jb=(a,b,c,d,e)=>{b=W(b);d=0n===d;let f=g=>g;if(d){const g=8*c;f=h=>BigInt.asUintN(g,h);e=f(e)}V(a,{name:b,B:f,F:(g,h)=>{"number"==typeof h&&(h=BigInt(h));return h},L:Ch(b,c,!d),H:null})};Jb.g="vpppjj";
var Kb=(a,b,c,d)=>{b=W(b);V(a,{name:b,B:function(e){return!!e},F:function(e,f){return f?c:d},L:function(e){return this.B(y[e])},H:null})};Kb.g="vppii";
var Dh=a=>{throw new X(a.l.D.u.name+" instance already deleted");},Eh=!1,Fh=!1,Gh=()=>{},Hh=a=>{if(Eh)return Hh=b=>b.deleteLater(),Hh(a);if(!globalThis.FinalizationRegistry)return Hh=b=>b,a;Fh=new FinalizationRegistry(b=>{b=b.l;--b.count.value;0===b.count.value&&(b.K?b.S.Z(b.K):b.D.u.Z(b.s))});Hh=b=>{var c=b.l;c.K&&Fh.register(b,{l:c},b);return b};Gh=b=>{Fh.unregister(b)};return Hh(a)},Ih=[],Jh=()=>{for(;Ih.length;){var a=Ih.pop();a.l.ja=!1;a["delete"]()}},Kh;function Lh(){}
var Mh={},Nh=(a,b,c)=>{if(void 0===a[b].G){var d=a[b];a[b]=function(...e){if(!a[b].G.hasOwnProperty(e.length))throw new X(`Function '${c}' called with an invalid number of arguments (${e.length}) - expects one of (${a[b].G})!`);return a[b].G[e.length].apply(this,e)};a[b].G=[];a[b].G[d.$]=d}},Oh=(a,b,c)=>{if(n.hasOwnProperty(a)){if(void 0===c||void 0!==n[a].G&&void 0!==n[a].G[c])throw new X(`Cannot register public name '${a}' twice`);Nh(n,a,a);if(n[a].G.hasOwnProperty(c))throw new X(`Cannot register multiple overloads of a function with the same number of arguments (${c})!`);
n[a].G[c]=b}else n[a]=b,n[a].$=c},Ph=a=>{a=a.replace(/[^a-zA-Z0-9_]/g,"$");var b=a.charCodeAt(0);return 48<=b&&57>=b?`_${a}`:a};function Qh(a,b,c,d,e,f,g,h){this.name=a;this.constructor=b;this.ca=c;this.Z=d;this.N=e;this.Mb=f;this.wa=g;this.Gb=h;this.lc=[]}
var Rh=(a,b,c)=>{for(;b!==c;){if(!b.wa)throw new X(`Expected null or instance of ${c.name}, got an instance of ${b.name}`);a=b.wa(a);b=b.N}return a},Sh=a=>{if(null===a)return"null";var b=typeof a;return"object"===b||"array"===b||"function"===b?a.toString():""+a};
function Th(a,b){if(null===b){if(this.La)throw new X(`null is not a valid ${this.name}`);return 0}if(!b.l)throw new X(`Cannot pass "${Sh(b)}" as a ${this.name}`);if(!b.l.s)throw new X(`Cannot pass deleted object as a pointer of type ${this.name}`);return Rh(b.l.s,b.l.D.u,this.u)}
function Uh(a,b){if(null===b){if(this.La)throw new X(`null is not a valid ${this.name}`);if(this.Ba){var c=this.Sa();null!==a&&a.push(this.Z,c);return c}return 0}if(!b||!b.l)throw new X(`Cannot pass "${Sh(b)}" as a ${this.name}`);if(!b.l.s)throw new X(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Aa&&b.l.D.Aa)throw new X(`Cannot convert argument of type ${b.l.S?b.l.S.name:b.l.D.name} to parameter type ${this.name}`);c=Rh(b.l.s,b.l.D.u,this.u);if(this.Ba){if(void 0===b.l.K)throw new X("Passing raw pointer to smart pointer is illegal");
switch(this.rc){case 0:if(b.l.S===this)c=b.l.K;else throw new X(`Cannot convert argument of type ${b.l.S?b.l.S.name:b.l.D.name} to parameter type ${this.name}`);break;case 1:c=b.l.K;break;case 2:if(b.l.S===this)c=b.l.K;else{var d=b.clone();c=this.mc(c,Vh(()=>d["delete"]()));null!==a&&a.push(this.Z,c)}break;default:throw new X("Unsupported sharing policy");}}return c}
function Wh(a,b){if(null===b){if(this.La)throw new X(`null is not a valid ${this.name}`);return 0}if(!b.l)throw new X(`Cannot pass "${Sh(b)}" as a ${this.name}`);if(!b.l.s)throw new X(`Cannot pass deleted object as a pointer of type ${this.name}`);if(b.l.D.Aa)throw new X(`Cannot convert argument of type ${b.l.D.name} to parameter type ${this.name}`);return Rh(b.l.s,b.l.D.u,this.u)}
var Xh=(a,b,c)=>{if(b===c)return a;if(void 0===c.N)return null;a=Xh(a,b,c.N);return null===a?null:c.Gb(a)},Yh={},Zh=(a,b)=>{if(void 0===b)throw new X("ptr should not be undefined");for(;a.N;)b=a.wa(b),a=a.N;return Yh[b]},$h=(a,b)=>{if(!b.D||!b.s)throw new yh("makeClassHandle requires ptr and ptrType");if(!!b.S!==!!b.K)throw new yh("Both smartPtrType and smartPtr must be specified");b.count={value:1};return Hh(Object.create(a,{l:{value:b,writable:!0}}))};
function ai(a,b,c,d,e,f,g,h,k,l,m){this.name=a;this.u=b;this.La=c;this.Aa=d;this.Ba=e;this.kc=f;this.rc=g;this.ob=h;this.Sa=k;this.mc=l;this.Z=m;e||void 0!==b.N?this.F=Uh:(this.F=d?Th:Wh,this.H=null)}var bi=(a,b,c)=>{if(!n.hasOwnProperty(a))throw new yh("Replacing nonexistent public symbol");void 0!==n[a].G&&void 0!==c?n[a].G[c]=b:(n[a]=b,n[a].$=c)},Y=(a,b)=>{a=W(a);var c=Q(b);if("function"!=typeof c)throw new X(`unknown function pointer with signature ${a}: ${b}`);return c};
class ci extends Error{}
var di=a=>{a=De(a);var b=W(a);L(a);return b},ei=(a,b)=>{function c(f){e[f]||wh[f]||(xh[f]?xh[f].forEach(c):(d.push(f),e[f]=!0))}var d=[],e={};b.forEach(c);throw new ci(`${a}: `+d.map(di).join([", "]));},Lb=(a,b,c,d,e,f,g,h,k,l,m,p,r)=>{m=W(m);f=Y(e,f);h&&=Y(g,h);l&&=Y(k,l);r=Y(p,r);var q=Ph(m);Oh(q,function(){ei(`Cannot construct ${m} due to unbound types`,[d])});zh([a,b,c],d?[d]:[],u=>{u=u[0];if(d){var A=u.u;var G=A.ca}else G=Lh.prototype;u=hg(m,function(...I){if(Object.getPrototypeOf(this)!==D)throw new X(`Use 'new' to construct ${m}`);
if(void 0===H.ia)throw new X(`${m} has no accessible constructor`);var Na=H.ia[I.length];if(void 0===Na)throw new X(`Tried to invoke ctor of ${m} with invalid number of parameters (${I.length}) - expected (${Object.keys(H.ia).toString()}) parameters instead!`);return Na.apply(this,I)});var D=Object.create(G,{constructor:{value:u}});u.prototype=D;var H=new Qh(m,u,D,r,A,f,h,l);if(H.N){var R;(R=H.N).xa??(R.xa=[]);H.N.xa.push(H)}A=new ai(m,H,!0,!1,!1);R=new ai(m+"*",H,!1,!1,!1);G=new ai(m+" const*",H,
!1,!0,!1);Mh[a]={pointerType:R,Eb:G};bi(q,u);return[A,R,G]})};Lb.g="vppppppppppppp";function fi(a){for(var b=1;b<a.length;++b)if(null!==a[b]&&void 0===a[b].H)return!0;return!1}
function gi(a,b,c,d,e,f){var g=b.length;if(2>g)throw new X("argTypes array size mismatch! Must at least get return value and 'this' types!");var h=null!==b[1]&&null!==c,k=fi(b);c=!b[0].hb;var l=b[0],m=b[1];d=[a,Ah,d,e,th,l.B.bind(l),m?.F.bind(m)];for(e=2;e<g;++e)l=b[e],d.push(l.F.bind(l));if(!k)for(e=h?1:2;e<b.length;++e)null!==b[e].H&&d.push(b[e].H);k=fi(b);e=b.length-2;m=[];l=["fn"];h&&l.push("thisWired");for(g=0;g<e;++g)m.push(`arg${g}`),l.push(`arg${g}Wired`);m=m.join(",");l=l.join(",");m=`return function (${m}) {\n`;
k&&(m+="var destructors = [];\n");var p=k?"destructors":"null",r="humanName throwBindingError invoker fn runDestructors fromRetWire toClassParamWire".split(" ");h&&(m+=`var thisWired = toClassParamWire(${p}, this);\n`);for(g=0;g<e;++g){var q=`toArg${g}Wire`;m+=`var arg${g}Wired = ${q}(${p}, arg${g});\n`;r.push(q)}m+=(c||f?"var rv = ":"")+`invoker(${l});\n`;if(k)m+="runDestructors(destructors);\n";else for(g=h?1:2;g<b.length;++g)f=1===g?"thisWired":"arg"+(g-2)+"Wired",null!==b[g].H&&(m+=`${f}_dtor(${f});\n`,
r.push(`${f}_dtor`));c&&(m+="var ret = fromRetWire(rv);\nreturn ret;\n");b=(new Function(r,m+"}\n"))(...d);return hg(a,b)}
var hi=(a,b)=>{for(var c=[],d=0;d<a;d++)c.push(E[b+4*d>>2]);return c},li=a=>{a=a.trim();const b=a.indexOf("(");return-1===b?a:a.slice(0,b)},Mb=(a,b,c,d,e,f,g,h)=>{var k=hi(c,d);b=W(b);b=li(b);f=Y(e,f);zh([],[a],l=>{function m(){ei(`Cannot call ${p} due to unbound types`,k)}l=l[0];var p=`${l.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);var r=l.u.constructor;void 0===r[b]?(m.$=c-1,r[b]=m):(Nh(r,b,p),r[b].G[c-1]=m);zh([],k,q=>{q=gi(p,[q[0],null].concat(q.slice(1)),null,f,g,h);void 0===
r[b].G?(q.$=c-1,r[b]=q):r[b].G[c-1]=q;if(l.u.xa)for(const u of l.u.xa)u.constructor.hasOwnProperty(b)||(u.constructor[b]=q);return[]});return[]})};Mb.g="vppippppii";
var Nb=(a,b,c,d,e,f)=>{var g=hi(b,c);e=Y(d,e);zh([],[a],h=>{h=h[0];var k=`constructor ${h.name}`;void 0===h.u.ia&&(h.u.ia=[]);if(void 0!==h.u.ia[b-1])throw new X(`Cannot register multiple constructors with identical number of parameters (${b-1}) for class '${h.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);h.u.ia[b-1]=()=>{ei(`Cannot construct ${h.name} due to unbound types`,g)};zh([],g,l=>{l.splice(1,0,null);h.u.ia[b-1]=gi(k,l,null,e,f);
return[]});return[]})};Nb.g="vpipppp";
var Ob=(a,b,c,d,e,f,g,h,k)=>{var l=hi(c,d);b=W(b);b=li(b);f=Y(e,f);zh([],[a],m=>{function p(){ei(`Cannot call ${r} due to unbound types`,l)}m=m[0];var r=`${m.name}.${b}`;b.startsWith("@@")&&(b=Symbol[b.substring(2)]);h&&m.u.lc.push(b);var q=m.u.ca,u=q[b];void 0===u||void 0===u.G&&u.className!==m.name&&u.$===c-2?(p.$=c-2,p.className=m.name,q[b]=p):(Nh(q,b,r),q[b].G[c-2]=p);zh([],l,A=>{A=gi(r,A,m,f,g,k);void 0===q[b].G?(A.$=c-2,q[b]=A):q[b].G[c-2]=A;return[]});return[]})};Ob.g="vppippppiii";
var mi=(a,b,c)=>{if(!(a instanceof Object))throw new X(`${c} with invalid "this": ${a}`);if(!(a instanceof b.u.constructor))throw new X(`${c} incompatible with "this" of type ${a.constructor.name}`);if(!a.l.s)throw new X(`cannot call emscripten binding method ${c} on deleted object`);return Rh(a.l.s,a.l.D.u,b.u)},Pb=(a,b,c,d,e,f,g,h,k,l)=>{b=W(b);e=Y(d,e);zh([],[a],m=>{m=m[0];var p=`${m.name}.${b}`,r={get(){ei(`Cannot access ${p} due to unbound types`,[c,g])},enumerable:!0,configurable:!0};r.set=
k?()=>ei(`Cannot access ${p} due to unbound types`,[c,g]):()=>{throw new X(p+" is a read-only property");};Object.defineProperty(m.u.ca,b,r);zh([],k?[c,g]:[c],q=>{var u=q[0],A={get(){var D=mi(this,m,p+" getter");return u.B(e(f,D))},enumerable:!0};if(k){k=Y(h,k);var G=q[1];A.set=function(D){var H=mi(this,m,p+" setter"),R=[];k(l,H,G.F(R,D));th(R)}}Object.defineProperty(m.u.ca,b,A);return[]});return[]})};Pb.g="vpppppppppp";
var ni=[],oi=[0,1,,1,null,1,!0,1,!1,1],qc=a=>{9<a&&0===--oi[a+1]&&(oi[a]=void 0,ni.push(a))};qc.g="vp";var Z=a=>{if(!a)throw new X(`Cannot use deleted val. handle = ${a}`);return oi[a]},Vh=a=>{switch(a){case void 0:return 2;case null:return 4;case !0:return 6;case !1:return 8;default:const b=ni.pop()||oi.length;oi[b]=a;oi[b+1]=1;return b}},pi={name:"emscripten::val",B:a=>{var b=Z(a);qc(a);return b},F:(a,b)=>Vh(b),L:uh,H:null},Qb=a=>V(a,pi);Qb.g="vp";
var qi=(a,b,c)=>{switch(b){case 1:return c?function(d){return this.B(x[d])}:function(d){return this.B(y[d])};case 2:return c?function(d){return this.B(z[d>>1])}:function(d){return this.B(B[d>>1])};case 4:return c?function(d){return this.B(C[d>>2])}:function(d){return this.B(E[d>>2])};default:throw new TypeError(`invalid integer width (${b}): ${a}`);}},Rb=(a,b,c,d,e)=>{b=W(b);e=0===e?"object":1===e?"number":"string";switch(e){case "object":function g(){}g.values={};V(a,{name:b,constructor:g,valueType:e,
B:function(h){return this.constructor.values[h]},F:(h,k)=>k.value,L:qi(b,c,d),H:null});Oh(b,g);break;case "number":var f={};V(a,{name:b,Ma:f,valueType:e,B:h=>h,F:(h,k)=>k,L:qi(b,c,d),H:null});Oh(b,f);delete n[b].$;break;case "string":f={},V(a,{name:b,vb:{},pb:{},Ma:f,valueType:e,B:function(h){return this.pb[h]},F:function(h,k){return this.vb[k]},L:qi(b,c,d),H:null}),Oh(b,f),delete n[b].$}};Rb.g="vpppii";
var ri=(a,b)=>{var c=wh[a];if(void 0===c)throw a=`${b} has unknown type ${di(a)}`,new X(a);return c},Sb=(a,b,c)=>{var d=ri(a,"enum");b=W(b);switch(d.valueType){case "object":a=d.constructor;d=Object.create(d.constructor.prototype,{value:{value:c},constructor:{value:hg(`${d.name}_${b}`,function(){})}});a.values[c]=d;a[b]=d;break;case "number":d.Ma[b]=c;break;case "string":d.vb[b]=c,d.pb[c]=b,d.Ma[b]=b}};Sb.g="vppi";
var si=(a,b)=>{switch(b){case 4:return function(c){return this.B(La[c>>2])};case 8:return function(c){return this.B(Ma[c>>3])};default:throw new TypeError(`invalid float width (${b}): ${a}`);}},Tb=(a,b,c)=>{b=W(b);V(a,{name:b,B:d=>d,F:(d,e)=>e,L:si(b,c),H:null})};Tb.g="vppp";var Ub=(a,b,c,d,e,f,g)=>{var h=hi(b,c);a=W(a);a=li(a);e=Y(d,e);Oh(a,function(){ei(`Cannot call ${a} due to unbound types`,h)},b-1);zh([],h,k=>{bi(a,gi(a,[k[0],null].concat(k.slice(1)),null,e,f,g),b-1);return[]})};Ub.g="vpippppii";
var Vb=(a,b,c,d,e)=>{b=W(b);let f=h=>h;if(0===d){var g=32-8*c;f=h=>h<<g>>>g;e=f(e)}V(a,{name:b,B:f,F:(h,k)=>k,L:Ch(b,c,0!==d),H:null})};Vb.g="vpppii";var ti=(a,b,c)=>{const d=(e,f)=>{let g=0;return{next(){if(g>=e)return{done:!0};const h=g;g++;return{value:f(h),done:!1}},[Symbol.iterator](){return this}}};a[Symbol.iterator]||(a[Symbol.iterator]=function(){const e=this[b]();return d(e,f=>this[c](f))})},Wb=(a,b,c,d)=>{c=W(c);d=W(d);zh([],[a,b],e=>{ti(e[0].u.ca,c,d);return[]})};Wb.g="vpppp";
var Xb=(a,b,c)=>{function d(f){return new e(x.buffer,E[f+4>>2],E[f>>2])}var e=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][b];c=W(c);V(a,{name:c,B:d,L:d},{Ub:!0})};Xb.g="vpip";var ui=Object.assign({optional:!0},pi),Yb=a=>{V(a,ui)};Yb.g="vpp";
var Zb=(a,b)=>{b=W(b);V(a,{name:b,B(c){var d=S(c+4,E[c>>2],!0);L(c);return d},F(c,d){d instanceof ArrayBuffer&&(d=new Uint8Array(d));var e="string"==typeof d;if(!(e||ArrayBuffer.isView(d)&&1==d.BYTES_PER_ELEMENT))throw new X("Cannot pass non-string to std::string");var f=e?yg(d):d.length;var g=Ae(4+f+1),h=g+4;E[g>>2]=f;e?zg(d,y,h,f+1):y.set(d,h);null!==c&&c.push(L,g);return g},L:uh,H(c){L(c)}})};Zb.g="vpp";
var vi=new TextDecoder("utf-16le"),wi=(a,b,c)=>{a>>=1;return vi.decode(B.slice(a,Rf(B,a,b/2,c)))},xi=(a,b,c)=>{c??=2147483647;if(2>c)return 0;c-=2;var d=b;c=c<2*a.length?c/2:a.length;for(var e=0;e<c;++e)z[b>>1]=a.charCodeAt(e),b+=2;z[b>>1]=0;return b-d},yi=a=>2*a.length,zi=(a,b,c)=>{var d="";a>>=2;for(var e=0;!(e>=b/4);e++){var f=E[a+e];if(!f&&!c)break;d+=String.fromCodePoint(f)}return d},Ai=(a,b,c)=>{c??=2147483647;if(4>c)return 0;var d=b;c=d+c-4;for(var e=0;e<a.length;++e){var f=a.codePointAt(e);
65535<f&&e++;C[b>>2]=f;b+=4;if(b+4>c)break}C[b>>2]=0;return b-d},Bi=a=>{for(var b=0,c=0;c<a.length;++c)65535<a.codePointAt(c)&&c++,b+=4;return b},$b=(a,b,c)=>{c=W(c);if(2===b){var d=wi;var e=xi;var f=yi}else d=zi,e=Ai,f=Bi;V(a,{name:c,B:g=>{var h=d(g+4,E[g>>2]*b,!0);L(g);return h},F:(g,h)=>{if("string"!=typeof h)throw new X(`Cannot pass non-string to C++ string type ${c}`);var k=f(h),l=Ae(4+k+b);E[l>>2]=k/b;e(h,l+4,k+b);null!==g&&g.push(L,l);return l},L:uh,H(g){L(g)}})};$b.g="vppp";
var ac=(a,b,c,d,e,f)=>{sh[a]={name:W(b),Sa:Y(c,d),Z:Y(e,f),cb:[]}};ac.g="vpppppp";var bc=(a,b,c,d,e,f,g,h,k,l)=>{sh[a].cb.push({Kb:W(b),Qb:c,oa:Y(d,e),Pb:f,oc:g,nc:Y(h,k),pc:l})};bc.g="vpppppppppp";var cc=(a,b)=>{b=W(b);V(a,{hb:!0,name:b,B:()=>{},F:()=>{}})};cc.g="vpp";var dc=(a,b,c,d)=>{function e(h){var k=S(a+36);qh(`'Could not load dynamic lib: ${k}\n${h}`);--gf;Cf(()=>Q(c)(a,d))}function f(){--gf;Cf(()=>Q(b)(a,d))}gf+=1;var g=rh(a,{I:!0});g?g.then(f,e):e()};dc.g="vpppp";
function Ci(a){var b=Di,c=b.R.pop()||b.ga.length;b.ga[c]=a;return c}function Ei(a){var b=Di;b.ga[a]=void 0;b.R.push(a)}class Fi{ga=[void 0];R=[];get(a){return this.ga[a]}has(a){return void 0!==this.ga[a]}}
var Di=new Fi,Gi=()=>{var a={};a.promise=new Promise((b,c)=>{a.reject=c;a.resolve=b});a.id=Ci(a);return a},Hi=async()=>{const a=Df,b=[];var c=Gi();b.push(c.promise);He(c.id);for(const d of Object.keys(jf)){const e=Number(d);e===a||kf.has(e)||(c=Gi(),Je(e,c.id),lf[e]=c,b.push(c.promise))}await Promise.all(b);lf={}};function ec(){if(t)return P(17,2);if(Df)return Hi();for(const a of Object.keys(jf)){const b=Number(a);kf.has(b)||Ke(b)}}ec.g="v";
function fc(){var a=Ae(4*(la.length+1)),b=a;la.forEach(c=>{var d=E,e=b>>2,f=yg(c)+1,g=Ae(f);g&&zg(c,y,g,f);d[e]=g;b+=4});E[b>>2]=0;return a}fc.g="p";var gc=a=>{Ea(a,!ba,1,!aa,262144,!1);Fa()};gc.g="vp";var Ii=!Atomics.waitAsync||globalThis.navigator?.userAgent&&91>Number((navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)||[])[2]),Ga=a=>{Ii||(Atomics.waitAsync(C,a>>2,a).value.then(Ja),Atomics.store(C,a+128>>2,1))};Ga.g="vp";
var Ja=()=>Cf(()=>{var a=ze();a&&(Ga(a),Qe())}),hc=(a,b)=>{a==b?setTimeout(Ja):t?postMessage({Ea:a,W:"checkMailbox"}):(a=jf[a])&&a.postMessage({W:"checkMailbox"})};hc.g="vpp";var Ji=[],ic=(a,b,c,d,e,f,g)=>{Ji.length=0;var h=e>>3;for(d=e+d>>3;h<d;){var k;F[h++]?k=F[h++]:k=Ma[h++];Ji.push(k)}a=b?mg[b]:Ki[a];Df=c;c=a(...Ji);Df=0;if(f)c.then(l=>Me(f,g,l));else return c};ic.g="dippippp";var jc=()=>{Ef=!1;gf=0};jc.g="v";var kc=a=>{t?postMessage({W:"cleanupThread",Va:a}):of(a)};kc.g="vp";
var lc=a=>{t?postMessage({W:"markAsFinished",Va:a}):qf(a)};lc.g="vp";var mc=()=>{};mc.g="vp";var nc=()=>{throw new qa;};nc.g="v";var oc=(a,b)=>{a=Z(a);b=Z(b);a.set(b)};oc.g="vpp";
var Li=[],Mi=a=>{var b=Li.length;Li.push(a);return b},Ni=(a,b)=>{for(var c=Array(a),d=0;d<a;++d)c[d]=ri(E[b+4*d>>2],`parameter ${d}`);return c},Oi=(a,b,c)=>{var d=[];a=a(d,c);d.length&&(E[b>>2]=Vh(d));return a},Pi={},Qi=a=>{var b=Pi[a];return void 0===b?W(a):b},pc=(a,b,c)=>{var [d,...e]=Ni(a,b);b=d.F.bind(d);var f=e.map(k=>k.L.bind(k));a--;var g={toValue:Z};a=f.map((k,l)=>{var m=`argFromPtr${l}`;g[m]=k;return`${m}(args${l?"+"+8*l:""})`});switch(c){case 0:var h="toValue(handle)";break;case 2:h="new (toValue(handle))";
break;case 3:h="";break;case 1:g.getStringOrSymbol=Qi,h="toValue(handle)[getStringOrSymbol(methodName)]"}h+=`(${a})`;d.hb||(g.toReturnWire=b,g.emval_returnValue=Oi,h=`return emval_returnValue(toReturnWire, destructorsRef, ${h})`);h=`return function (handle, methodName, destructorsRef, args) {\n${h}\n}`;c=(new Function(Object.keys(g),h))(...Object.values(g));h=`methodCaller<(${e.map(k=>k.name)}) => ${d.name}>`;return Mi(hg(h,c))};pc.g="pipi";var rc=a=>{if(!a)return Vh(globalThis);a=Qi(a);return Vh(globalThis[a])};
rc.g="pp";var sc=a=>{a=Qi(a);return Vh(n[a])};sc.g="pp";var tc=(a,b)=>{a=Z(a);b=Z(b);return Vh(a[b])};tc.g="ppp";var uc=a=>{9<a&&(oi[a+1]+=1)};uc.g="vp";var vc=(a,b)=>{a=Z(a);b=Z(b);return a instanceof b};vc.g="ipp";var wc=(a,b,c,d,e)=>Li[a](b,c,d,e);wc.g="dppppp";var xc=a=>{a=Z(a);return"number"==typeof a};xc.g="ip";var yc=a=>{a=Z(a);return"string"==typeof a};yc.g="ip";var zc=a=>Vh(Qi(a));zc.g="pp";var Ac=a=>{var b=Z(a);th(b);qc(a)};Ac.g="vp";var Bc=(a,b,c)=>{a=Z(a);b=Z(b);c=Z(c);a[b]=c};Bc.g="vppp";
var Cc=a=>{a=Z(a);return Vh(typeof a)};Cc.g="pp";function Dc(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);C[b>>2]=a.getUTCSeconds();C[b+4>>2]=a.getUTCMinutes();C[b+8>>2]=a.getUTCHours();C[b+12>>2]=a.getUTCDate();C[b+16>>2]=a.getUTCMonth();C[b+20>>2]=a.getUTCFullYear()-1900;C[b+24>>2]=a.getUTCDay();C[b+28>>2]=(a.getTime()-Date.UTC(a.getUTCFullYear(),0,1,0,0,0,0))/864E5|0}Dc.g="vjp";
var Ri=[0,31,60,91,121,152,182,213,244,274,305,335],Si=[0,31,59,90,120,151,181,212,243,273,304,334];
function Ec(a,b){a=-9007199254740992>a||9007199254740992<a?NaN:Number(a);a=new Date(1E3*a);C[b>>2]=a.getSeconds();C[b+4>>2]=a.getMinutes();C[b+8>>2]=a.getHours();C[b+12>>2]=a.getDate();C[b+16>>2]=a.getMonth();C[b+20>>2]=a.getFullYear()-1900;C[b+24>>2]=a.getDay();var c=a.getFullYear();C[b+28>>2]=(0!==c%4||0===c%100&&0!==c%400?Si:Ri)[a.getMonth()]+a.getDate()-1|0;C[b+36>>2]=-(60*a.getTimezoneOffset());c=(new Date(a.getFullYear(),6,1)).getTimezoneOffset();var d=(new Date(a.getFullYear(),0,1)).getTimezoneOffset();
C[b+32>>2]=(c!=d&&a.getTimezoneOffset()==Math.min(d,c))|0}Ec.g="vjp";function Fc(a,b,c,d,e,f,g){if(t)return P(18,1,a,b,c,d,e,f,g);e=-9007199254740992>e||9007199254740992<e?NaN:Number(e);try{var h=U(d),k=FS.la(h,a,e,b,c),l=k.s;C[f>>2]=k.ga;E[g>>2]=l;return 0}catch(m){if("undefined"==typeof FS||"ErrnoError"!==m.name)throw m;return-m.A}}Fc.g="ipiiijpp";
function Gc(a,b,c,d,e,f){if(t)return P(19,1,a,b,c,d,e,f);f=-9007199254740992>f||9007199254740992<f?NaN:Number(f);try{var g=U(e);if(c&2){c=f;if(!FS.isFile(g.node.mode))throw new FS.h(43);d&2||FS.na(g,y.slice(a,a+b),c,b,d)}}catch(h){if("undefined"==typeof FS||"ErrnoError"!==h.name)throw h;return-h.A}}Gc.g="ippiiij";
var Hc=(a,b,c,d)=>{var e=(new Date).getFullYear(),f=(new Date(e,0,1)).getTimezoneOffset();e=(new Date(e,6,1)).getTimezoneOffset();E[a>>2]=60*Math.max(f,e);C[b>>2]=Number(f!=e);b=g=>{var h=Math.abs(g);return`UTC${0<=g?"-":"+"}${String(Math.floor(h/60)).padStart(2,"0")}${String(h%60).padStart(2,"0")}`};a=b(f);b=b(e);e<f?(zg(a,y,c,17),zg(b,y,d,17)):(zg(a,y,d,17),zg(b,y,c,17))};Hc.g="vpppp";var Oc=()=>performance.timeOrigin+performance.now();Oc.g="d";var Kc=()=>Date.now();Kc.g="d";var Ti=1;
function Ic(a,b,c){if(!(0<=a&&3>=a))return 28;if(0===a)a=Date.now();else if(Ti)a=performance.timeOrigin+performance.now();else return 52;F[c>>3]=BigInt(Math.round(1E6*a));return 0}Ic.g="iijp";var Jc=()=>{};Jc.g="v";var Lc=a=>v(S(a));Lc.g="vp";var Mc=()=>{gf+=1;throw"unwind";};Mc.g="v";var Nc=()=>y.length;Nc.g="p";var Pc=()=>navigator.hardwareConcurrency;Pc.g="i";var Qc=a=>{Ei(a)};Qc.g="vp";
var Rc=(a,b,c)=>{a=Di.get(a);switch(b){case 0:a.resolve(c);break;case 1:a.resolve(Di.get(c).promise);break;case 2:a.resolve(Di.get(c).promise);Ei(c);break;case 3:a.reject(c)}};Rc.g="vpip";var Sc=()=>!1;Sc.g="ip";
var Ui={},Wi=()=>{if(!Vi){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:ea||"./this.program"},b;for(b in Ui)void 0===Ui[b]?delete a[b]:a[b]=Ui[b];var c=[];for(b in a)c.push(`${b}=${a[b]}`);Vi=c}return Vi},Vi;function Tc(a,b){if(t)return P(20,1,a,b);var c=0,d=0,e;for(e of Wi()){var f=b+c;E[a+d>>2]=f;c+=zg(e,y,f,Infinity)+1;d+=4}return 0}Tc.g="ipp";
function Uc(a,b){if(t)return P(21,1,a,b);var c=Wi();E[a>>2]=c.length;a=0;for(var d of c)a+=yg(d)+1;E[b>>2]=a;return 0}Uc.g="ipp";function Wc(a){if(t)return P(22,1,a);try{var b=U(a);FS.close(b);return 0}catch(c){if("undefined"==typeof FS||"ErrnoError"!==c.name)throw c;return c.A}}Wc.g="ii";
function Xc(a,b){if(t)return P(23,1,a,b);try{var c=U(a),d=c.C?2:FS.isDir(c.mode)?3:FS.isLink(c.mode)?7:4;x[b]=d;z[b+2>>1]=0;F[b+8>>3]=BigInt(0);F[b+16>>3]=BigInt(0);return 0}catch(e){if("undefined"==typeof FS||"ErrnoError"!==e.name)throw e;return e.A}}Xc.g="iip";
function Yc(a,b,c,d){if(t)return P(24,1,a,b,c,d);try{a:{var e=U(a);a=b;for(var f,g=b=0;g<c;g++){var h=E[a>>2],k=E[a+4>>2];a+=8;var l=FS.read(e,x,h,k,f);if(0>l){var m=-1;break a}b+=l;if(l<k)break;"undefined"!=typeof f&&(f+=l)}m=b}E[d>>2]=m;return 0}catch(p){if("undefined"==typeof FS||"ErrnoError"!==p.name)throw p;return p.A}}Yc.g="iippp";
function Zc(a,b,c,d){if(t)return P(25,1,a,b,c,d);b=-9007199254740992>b||9007199254740992<b?NaN:Number(b);try{if(isNaN(b))return 61;var e=U(a);FS.llseek(e,b,c);F[d>>3]=BigInt(e.position);e.Ha&&0===b&&0===c&&(e.Ha=null);return 0}catch(f){if("undefined"==typeof FS||"ErrnoError"!==f.name)throw f;return f.A}}Zc.g="iijip";
function $c(a,b,c,d){if(t)return P(26,1,a,b,c,d);try{a:{var e=U(a);a=b;for(var f,g=b=0;g<c;g++){var h=E[a>>2],k=E[a+4>>2];a+=8;var l=FS.write(e,x,h,k,f);if(0>l){var m=-1;break a}b+=l;if(l<k)break;"undefined"!=typeof f&&(f+=l)}m=b}E[d>>2]=m;return 0}catch(p){if("undefined"==typeof FS||"ErrnoError"!==p.name)throw p;return p.A}}$c.g="iippp";function bd(...a){return K.heif_color_conversion_options_ext_copy(...a)}bd.J=!0;function cd(...a){return K.heif_color_conversion_options_ext_free(...a)}cd.J=!0;
function dd(...a){return K.heif_encoding_options_alloc(...a)}dd.J=!0;function ed(...a){return K.heif_encoding_options_free(...a)}ed.J=!0;function fd(...a){return K.heif_error_success(...a)}fd.J=!0;function gd(...a){return K.heif_image_get_plane_readonly2(...a)}gd.J=!0;function hd(...a){return K.heif_image_release(...a)}hd.J=!0;function jd(...a){return K.heif_nclx_color_profile_alloc(...a)}jd.J=!0;function kd(...a){return K.heif_nclx_color_profile_free(...a)}kd.J=!0;
function ld(...a){return K.heif_tai_clock_info_copy(...a)}ld.J=!0;function md(...a){return K.heif_tai_clock_info_release(...a)}md.J=!0;function nd(...a){return K.heif_tai_timestamp_packet_copy(...a)}nd.J=!0;function od(...a){return K.heif_tai_timestamp_packet_release(...a)}od.J=!0;function ue(a,b){try{return Cg(y.subarray(a,a+b)),0}catch(c){if("undefined"==typeof FS||"ErrnoError"!==c.name)throw c;return c.A}}ue.g="ipp";
var sa=a=>{var b=O(),c=Ue(4),d=Ue(4);Xe(a,c,d);a=E[c>>2];d=E[d>>2];c=S(a);L(a);if(d){var e=S(d);L(d)}N(b);return[c,e]};t||zf();(()=>{var a={nb:Promise.resolve(),canHandle:b=>!n.noWasmDecoding&&b.endsWith(".so"),handle:async(b,c)=>a.nb=a.nb.then(async()=>{try{var d=await qg(b,{I:!0,ra:!0},c,{})}catch(e){throw Error(`failed to instantiate wasm: ${c}: ${e}`);}If[c]=d;return b})};Hf.push(a)})();FS.createPreloadedFile=(a,b,c,d,e,f,g,h,k,l)=>{Sg(a,b,c,d,e,h,k,l).then(f).catch(g)};FS.Pc=Sg;FS.ea=Array(4096);
FS.mount(T,{},"/");FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user");
(function(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:()=>0,write:(d,e,f,g)=>g,llseek:()=>0});FS.mkdev("/dev/null",FS.makedev(1,3));Ig(FS.makedev(5,0),Kg);Ig(FS.makedev(6,0),Lg);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var a=new Uint8Array(1024),b=0,c=()=>{0===b&&(Cg(a),b=a.byteLength);return a[--b]};FS.createDevice("/dev","random",c);FS.createDevice("/dev","urandom",c);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp")})();
(function(){FS.mkdir("/proc");var a=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount(){var b=FS.createNode(a,"fd",16895,73);b.o={llseek:T.o.llseek};b.m={ka(c,d){c=+d;var e=U(c);c={parent:null,mount:{kb:"fake"},m:{readlink:()=>e.path},id:c+1};return c.parent=c},ua(){return Array.from(FS.streams.entries()).filter(([,c])=>c).map(([c])=>c.toString())}};return b}},{},"/proc/self/fd")})();FS.Lb={MEMFS:T};
(()=>{let a=Lh.prototype;Object.assign(a,{isAliasOf:function(c){if(!(this instanceof Lh&&c instanceof Lh))return!1;var d=this.l.D.u,e=this.l.s;c.l=c.l;var f=c.l.D.u;for(c=c.l.s;d.N;)e=d.wa(e),d=d.N;for(;f.N;)c=f.wa(c),f=f.N;return d===f&&e===c},clone:function(){this.l.s||Dh(this);if(this.l.sa)return this.l.count.value+=1,this;var c=Hh,d=Object,e=d.create,f=Object.getPrototypeOf(this),g=this.l;c=c(e.call(d,f,{l:{value:{count:g.count,ja:g.ja,sa:g.sa,s:g.s,D:g.D,K:g.K,S:g.S}}}));c.l.count.value+=1;c.l.ja=
!1;return c},["delete"](){this.l.s||Dh(this);if(this.l.ja&&!this.l.sa)throw new X("Object already scheduled for deletion");Gh(this);var c=this.l;--c.count.value;0===c.count.value&&(c.K?c.S.Z(c.K):c.D.u.Z(c.s));this.l.sa||(this.l.K=void 0,this.l.s=void 0)},isDeleted:function(){return!this.l.s},deleteLater:function(){this.l.s||Dh(this);if(this.l.ja&&!this.l.sa)throw new X("Object already scheduled for deletion");Ih.push(this);1===Ih.length&&Kh&&Kh(Jh);this.l.ja=!0;return this}});const b=Symbol.dispose;
b&&(a[b]=a["delete"])})();
Object.assign(ai.prototype,{Ob(a){this.ob&&(a=this.ob(a));return a},Za(a){this.Z?.(a)},L:uh,B:function(a){function b(){return this.Ba?$h(this.u.ca,{D:this.kc,s:c,S:this,K:a}):$h(this.u.ca,{D:this,s:a})}var c=this.Ob(a);if(!c)return this.Za(a),null;var d=Zh(this.u,c);if(void 0!==d){if(0===d.l.count.value)return d.l.s=c,d.l.K=a,d.clone();d=d.clone();this.Za(a);return d}d=this.u.Mb(c);d=Mh[d];if(!d)return b.call(this);d=this.Aa?d.Eb:d.pointerType;var e=Xh(c,this.u,d.u);return null===e?b.call(this):this.Ba?
$h(d.u.ca,{D:d,s:e,S:this,K:a}):$h(d.u.ca,{D:d,s:e})}});pf.push(()=>{Ui.VIPS_MAX_THREADS=6<navigator.hardwareConcurrency?navigator.hardwareConcurrency:6;Ui.VIPS_CONCURRENCY=1});
Va.push(()=>{const a=Object.getOwnPropertyDescriptor(n.SourceCustom.prototype,"onRead");Object.defineProperty(n.SourceCustom.prototype,"onRead",{set(c){return a.set.call(this,d=>Vh(c(d)))}});const b=Object.getOwnPropertyDescriptor(n.TargetCustom.prototype,"onWrite");Object.defineProperty(n.TargetCustom.prototype,"onWrite",{set(c){return b.set.call(this,d=>c(Z(d)))}})});Object.assign(Lh.prototype,{preventAutoDelete:function(){const a=Ih.indexOf(this);-1<a&&Ih.splice(a,1);this.l.ja=!1;return this}});
if(!t){if(n.wasmMemory)ya=n.wasmMemory;else{var Xi=n.INITIAL_MEMORY||1073741824;ya=new WebAssembly.Memory({initial:Xi/65536,maximum:Xi/65536,shared:!0})}za()}n.preloadPlugins&&(Hf=n.preloadPlugins);n.noExitRuntime&&(Ef=n.noExitRuntime);n.print&&(ka=n.print);n.printErr&&(v=n.printErr);n.dynamicLibraries&&(la=n.dynamicLibraries);n.wasmBinary&&(ma=n.wasmBinary);n.arguments&&(da=n.arguments);n.thisProgram&&(ea=n.thisProgram);if(n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);0<n.preInit.length;)n.preInit.shift()();
n.ENV=Ui;n.addRunDependency=uf;n.removeRunDependency=tf;n.addFunction=eg;n.FS_preloadFile=Sg;n.FS_unlink=(...a)=>FS.unlink(...a);n.FS_createPath=(...a)=>FS.createPath(...a);n.FS_createDevice=(...a)=>FS.createDevice(...a);n.FS=FS;n.FS_createDataFile=(...a)=>FS.createDataFile(...a);n.FS_createLazyFile=(...a)=>FS.createLazyFile(...a);n.setAutoDeleteLater=a=>{Eh=a};n.deletionQueue=Ih;n.setDelayFunction=a=>{Kh=a;Ih.length&&Kh&&Kh(Jh)};n.incrementExceptionRefcount=a=>We(a instanceof ra?a.ha:a);
n.decrementExceptionRefcount=a=>Ve(a instanceof ra?a.ha:a);n.getExceptionMessage=a=>sa(a instanceof ra?a.ha:a);var Ki=[te,Ff,lh,nb,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab,ec,Fc,Gc,Tc,Uc,Wc,Xc,Yc,Zc,$c],mg={};function Yi(a){for(var b=B[a+6>>1];13===b&&!(16<E[a>>2]);){var c=E[a+8>>2],d=E[c>>2];if(0===d){b=0;break}else if(0===E[(c>>2)+1])a=d,b=B[d+6>>1];else break}return[a,b]}
function ad(a,b,c,d){var e=E[(a>>2)+1],f=E[(a>>2)+6],g=E[(a>>2)+2],h=E[(a>>2)+5];a=Yi(E[(a>>2)+3])[1];var k=O(),l=k,m=[],p=!1;if(15===a)throw Error("complex ret marshalling nyi");if(0>a||15<a)throw Error("Unexpected rtype "+a);if(4===a||13===a)m.push(c),p=!0;for(var r=0;r<f;r++){var q=E[(d>>2)+r],u=Yi(E[(g>>2)+r]),A=u[0];u=u[1];switch(u){case 1:case 10:case 9:m.push(E[q>>2]);break;case 2:m.push(La[q>>2]);break;case 3:m.push(Ma[q>>3]);break;case 5:m.push(y[q]);break;case 6:m.push(x[q]);break;case 7:m.push(B[q>>
1]);break;case 8:m.push(z[q>>1]);break;case 11:case 12:m.push(Oa[q>>3]);break;case 4:m.push(Oa[q>>3]);m.push(Oa[(q>>3)+1]);break;case 13:u=E[A>>2];A=B[A+4>>1];l-=u;l&=~(A-1);x.subarray(l,l+u).set(x.subarray(q,q+u));m.push(l);break;case 14:m.push(E[q>>2]);break;case 15:throw Error("complex marshalling nyi");default:throw Error("Unexpected type "+u);}}if(h&1){h=[];for(r=e-1;r>=f;r--)switch(q=E[(d>>2)+r],u=Yi(E[(g>>2)+r]),A=u[0],u=u[1],u){case 5:case 6:--l;l&=-1;y[l]=y[q];break;case 7:case 8:l-=2;l&=
-2;B[l>>1]=B[q>>1];break;case 1:case 9:case 10:case 2:l-=4;l&=-4;E[l>>2]=E[q>>2];break;case 3:case 11:case 12:l-=8;l&=-8;E[l>>2]=E[q>>2];E[(l>>2)+1]=E[(q>>2)+1];break;case 4:l-=16;l&=-8;E[l>>2]=E[q>>2];E[(l>>2)+1]=E[(q>>2)+1];E[(l>>2)+2]=E[(q>>2)+2];E[(l>>2)+3]=E[(q>>2)+3];break;case 13:l-=4;l&=-4;h.push([l,q,E[A>>2],B[A+4>>1]]);break;case 14:l-=4;l&=-4;E[l>>2]=E[q>>2];break;case 15:throw Error("complex arg marshalling nyi");default:throw Error("Unexpected argtype "+u);}m.push(l);for(r=0;r<h.length;r++)e=
h[r],d=e[0],q=e[1],u=e[2],A=e[3],l-=u,l&=~(A-1),x.subarray(l,l+u).set(x.subarray(q,q+u)),E[d>>2]=l}N(l);Ue(0);b=Q(b).apply(null,m);N(k);if(!p)switch(a){case 0:break;case 1:case 9:case 10:E[c>>2]=b;break;case 2:La[c>>2]=b;break;case 3:Ma[c>>3]=b;break;case 5:case 6:y[c+0]=b;break;case 7:case 8:B[c>>1]=b;break;case 11:case 12:Oa[c>>3]=b;break;case 14:E[c>>2]=b;break;case 15:throw Error("complex ret marshalling nyi");default:throw Error("Unexpected rtype "+a);}}ad.g="viiii";
var ze,Ae,L,Be,Ce,De,Ha,Ee,Fe,Ge,He,Ie,Je,Ke,Le,Ea,Ka,Me,Ne,Oe,Pe,Qe,Re,M,Se,Te,N,Ue,O,Ve,We,Xe,Ye,Ze,af,$e,K;function Sd(a,b){var c=O();try{Q(a)(b)}catch(d){N(c);if(!(d instanceof w))throw d;M(1,0)}}function ae(a,b,c,d){var e=O();try{Q(a)(b,c,d)}catch(f){N(e);if(!(f instanceof w))throw f;M(1,0)}}function zd(a,b,c){var d=O();try{return Q(a)(b,c)}catch(e){N(d);if(!(e instanceof w))throw e;M(1,0)}}function xd(a){var b=O();try{return Q(a)()}catch(c){N(b);if(!(c instanceof w))throw c;M(1,0)}}
function Rd(a){var b=O();try{Q(a)()}catch(c){N(b);if(!(c instanceof w))throw c;M(1,0)}}function yd(a,b){var c=O();try{return Q(a)(b)}catch(d){N(c);if(!(d instanceof w))throw d;M(1,0)}}function ie(a,b,c,d,e,f){var g=O();try{Q(a)(b,c,d,e,f)}catch(h){N(g);if(!(h instanceof w))throw h;M(1,0)}}function Bd(a,b,c,d){var e=O();try{return Q(a)(b,c,d)}catch(f){N(e);if(!(f instanceof w))throw f;M(1,0)}}function he(a,b,c,d,e){var f=O();try{Q(a)(b,c,d,e)}catch(g){N(f);if(!(g instanceof w))throw g;M(1,0)}}
function Ed(a,b,c,d,e,f){var g=O();try{return Q(a)(b,c,d,e,f)}catch(h){N(g);if(!(h instanceof w))throw h;M(1,0)}}function Wd(a,b,c){var d=O();try{Q(a)(b,c)}catch(e){N(d);if(!(e instanceof w))throw e;M(1,0)}}function Hd(a,b,c,d,e,f,g){var h=O();try{return Q(a)(b,c,d,e,f,g)}catch(k){N(h);if(!(k instanceof w))throw k;M(1,0)}}function sd(a,b,c,d,e,f){var g=O();try{return Q(a)(b,c,d,e,f)}catch(h){N(g);if(!(h instanceof w))throw h;M(1,0)}}
function Cd(a,b,c,d,e){var f=O();try{return Q(a)(b,c,d,e)}catch(g){N(f);if(!(g instanceof w))throw g;M(1,0)}}function rd(a,b,c,d){var e=O();try{return Q(a)(b,c,d)}catch(f){N(e);if(!(f instanceof w))throw f;M(1,0)}}function Xd(a,b,c,d){var e=O();try{Q(a)(b,c,d)}catch(f){N(e);if(!(f instanceof w))throw f;M(1,0)}}function Yd(a,b,c,d,e){var f=O();try{Q(a)(b,c,d,e)}catch(g){N(f);if(!(g instanceof w))throw g;M(1,0)}}
function Ad(a,b,c,d){var e=O();try{return Q(a)(b,c,d)}catch(f){N(e);if(!(f instanceof w))throw f;M(1,0)}}function Td(a,b,c){var d=O();try{Q(a)(b,c)}catch(e){N(d);if(!(e instanceof w))throw e;M(1,0)}}function pd(a,b){var c=O();try{return Q(a)(b)}catch(d){N(c);if(!(d instanceof w))throw d;M(1,0)}}function oe(a,b,c,d,e,f,g,h,k,l,m){var p=O();try{Q(a)(b,c,d,e,f,g,h,k,l,m)}catch(r){N(p);if(!(r instanceof w))throw r;M(1,0)}}
function je(a,b,c,d,e,f,g){var h=O();try{Q(a)(b,c,d,e,f,g)}catch(k){N(h);if(!(k instanceof w))throw k;M(1,0)}}function ke(a,b,c,d,e,f,g,h){var k=O();try{Q(a)(b,c,d,e,f,g,h)}catch(l){N(k);if(!(l instanceof w))throw l;M(1,0)}}function qd(a,b,c){var d=O();try{return Q(a)(b,c)}catch(e){N(d);if(!(e instanceof w))throw e;M(1,0)}}function $d(a,b,c,d,e){var f=O();try{Q(a)(b,c,d,e)}catch(g){N(f);if(!(g instanceof w))throw g;M(1,0)}}
function be(a,b,c,d,e){var f=O();try{Q(a)(b,c,d,e)}catch(g){N(f);if(!(g instanceof w))throw g;M(1,0)}}function Ud(a,b,c,d,e){var f=O();try{Q(a)(b,c,d,e)}catch(g){N(f);if(!(g instanceof w))throw g;M(1,0)}}function ee(a,b,c,d,e,f,g,h){var k=O();try{Q(a)(b,c,d,e,f,g,h)}catch(l){N(k);if(!(l instanceof w))throw l;M(1,0)}}function ce(a,b,c,d,e,f,g,h,k,l){var m=O();try{Q(a)(b,c,d,e,f,g,h,k,l)}catch(p){N(m);if(!(p instanceof w))throw p;M(1,0)}}
function de(a,b,c,d,e,f,g,h,k){var l=O();try{Q(a)(b,c,d,e,f,g,h,k)}catch(m){N(l);if(!(m instanceof w))throw m;M(1,0)}}function ge(a,b,c,d,e,f){var g=O();try{Q(a)(b,c,d,e,f)}catch(h){N(g);if(!(h instanceof w))throw h;M(1,0)}}function fe(a,b,c,d,e,f,g){var h=O();try{Q(a)(b,c,d,e,f,g)}catch(k){N(h);if(!(k instanceof w))throw k;M(1,0)}}function qe(a,b,c,d,e,f,g,h,k,l,m,p,r){var q=O();try{Q(a)(b,c,d,e,f,g,h,k,l,m,p,r)}catch(u){N(q);if(!(u instanceof w))throw u;M(1,0)}}
function pe(a,b,c,d,e,f,g,h,k,l,m,p){var r=O();try{Q(a)(b,c,d,e,f,g,h,k,l,m,p)}catch(q){N(r);if(!(q instanceof w))throw q;M(1,0)}}function ne(a,b,c,d,e,f,g,h,k,l){var m=O();try{Q(a)(b,c,d,e,f,g,h,k,l)}catch(p){N(m);if(!(p instanceof w))throw p;M(1,0)}}function me(a,b,c,d,e,f,g,h,k){var l=O();try{Q(a)(b,c,d,e,f,g,h,k)}catch(m){N(l);if(!(m instanceof w))throw m;M(1,0)}}
function re(a,b,c,d,e,f,g,h,k,l,m,p,r,q){var u=O();try{Q(a)(b,c,d,e,f,g,h,k,l,m,p,r,q)}catch(A){N(u);if(!(A instanceof w))throw A;M(1,0)}}function Zd(a,b,c,d,e,f){var g=O();try{Q(a)(b,c,d,e,f)}catch(h){N(g);if(!(h instanceof w))throw h;M(1,0)}}function Id(a,b,c,d,e,f,g,h){var k=O();try{return Q(a)(b,c,d,e,f,g,h)}catch(l){N(k);if(!(l instanceof w))throw l;M(1,0)}}function Pd(a,b){var c=O();try{return Q(a)(b)}catch(d){N(c);if(!(d instanceof w))throw d;M(1,0);return 0n}}
function Nd(a,b,c,d,e,f,g,h,k,l,m,p,r){var q=O();try{return Q(a)(b,c,d,e,f,g,h,k,l,m,p,r)}catch(u){N(q);if(!(u instanceof w))throw u;M(1,0)}}function Kd(a,b,c,d,e,f,g,h,k,l){var m=O();try{return Q(a)(b,c,d,e,f,g,h,k,l)}catch(p){N(m);if(!(p instanceof w))throw p;M(1,0)}}function le(a,b,c,d,e,f,g,h,k,l){var m=O();try{Q(a)(b,c,d,e,f,g,h,k,l)}catch(p){N(m);if(!(p instanceof w))throw p;M(1,0)}}
function Fd(a,b,c,d,e,f,g,h,k){var l=O();try{return Q(a)(b,c,d,e,f,g,h,k)}catch(m){N(l);if(!(m instanceof w))throw m;M(1,0)}}function vd(a,b,c){var d=O();try{return Q(a)(b,c)}catch(e){N(d);if(!(e instanceof w))throw e;M(1,0)}}function Jd(a,b,c,d,e,f,g,h,k){var l=O();try{return Q(a)(b,c,d,e,f,g,h,k)}catch(m){N(l);if(!(m instanceof w))throw m;M(1,0)}}function Vd(a,b,c,d,e){var f=O();try{Q(a)(b,c,d,e)}catch(g){N(f);if(!(g instanceof w))throw g;M(1,0)}}
function td(a,b){var c=O();try{return Q(a)(b)}catch(d){N(c);if(!(d instanceof w))throw d;M(1,0)}}function ud(a,b){var c=O();try{return Q(a)(b)}catch(d){N(c);if(!(d instanceof w))throw d;M(1,0)}}function Gd(a,b,c,d,e,f,g,h,k,l,m){var p=O();try{return Q(a)(b,c,d,e,f,g,h,k,l,m)}catch(r){N(p);if(!(r instanceof w))throw r;M(1,0)}}function Od(a,b,c,d,e,f){var g=O();try{return Q(a)(b,c,d,e,f)}catch(h){N(g);if(!(h instanceof w))throw h;M(1,0)}}
function Dd(a,b,c,d,e,f){var g=O();try{return Q(a)(b,c,d,e,f)}catch(h){N(g);if(!(h instanceof w))throw h;M(1,0)}}function Ld(a,b,c,d,e,f,g,h,k,l,m){var p=O();try{return Q(a)(b,c,d,e,f,g,h,k,l,m)}catch(r){N(p);if(!(r instanceof w))throw r;M(1,0)}}function Qd(a,b,c,d,e){var f=O();try{return Q(a)(b,c,d,e)}catch(g){N(f);if(!(g instanceof w))throw g;M(1,0);return 0n}}function wd(a,b,c,d){var e=O();try{return Q(a)(b,c,d)}catch(f){N(e);if(!(f instanceof w))throw f;M(1,0)}}
function Md(a,b,c,d,e,f,g,h,k,l,m,p){var r=O();try{return Q(a)(b,c,d,e,f,g,h,k,l,m,p)}catch(q){N(r);if(!(q instanceof w))throw q;M(1,0)}}function se(a,b,c,d,e,f,g,h,k,l,m,p,r,q,u,A){var G=O();try{Q(a)(b,c,d,e,f,g,h,k,l,m,p,r,q,u,A)}catch(D){N(G);if(!(D instanceof w))throw D;M(1,0)}}function Zi(a=[]){var b=lg("main").Ua;if(b){a.unshift(ea);var c=a.length,d=Ue(4*(c+1)),e=d,f;for(f of a)E[e>>2]=Ag(f),e+=4;E[e>>2]=0;try{var g=b(c,d);Vc(g,!0)}catch(h){ff(h)}}}
function Ca(a=da){function b(){n.calledRun=!0;if(!oa&&(Sa(),ta?.(n),n.onRuntimeInitialized?.(),n.noInitialRun||Zi(a),!t)){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;){var c=n.postRun.shift();Pf.push(c)}Ta(Pf)}}if(0<rf)sf=Ca;else if(t)ta?.(n),Sa();else{if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)pf.push(n.preRun.shift());Ta(pf);0<rf?sf=Ca:n.setStatus?(n.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>n.setStatus(""),
1);b()},1)):b()}}var Ua;t||(Ua=await (Ba()),Ca());Pa?moduleRtn=n:moduleRtn=new Promise((a,b)=>{ta=a;ua=b});
;return moduleRtn}})();if(typeof exports==="object"&&typeof module==="object"){module.exports=Vips;module.exports.default=Vips}else if(typeof define==="function"&&define["amd"])define([],()=>Vips);var isPthread=globalThis.name=="em-pthread";isPthread&&Vips();
